title: Put the value of for loop inside array
body: <p>I am trying to reate an array that contains all the odd numbers between <code>1</code> to <code>20,000</code>. I Use the <code>var_dump()</code> at the end to display the array values without using loops.</p>
  
  <p>For some reason it won't work out.</p>
  
  <p>here's my code so far:</p>
  
  <pre><code>$array_variable = array();
  
  for($i=1; $i&lt;=20000; $i++){
      if($i%2 == 1){ // if the remainder after division `$i` by 2 is one{
          print_r($array_variable[$i]); // if odd, echo it out and then echo newline for better readability;
      }
  }
  
  var_dump($array_variable);
  </code></pre>