title: Push data into array with for loop
body: <p>I need to generate an array like this:</p>
  
  <pre><code>$person = array(
      array(
          "name" =&gt; "brian",
          "age" =&gt; "25"
      ),
      array(
           "name" =&gt; "simon",
           "age" =&gt; "21"
      )
  );
  </code></pre>
  
  <p>I put this code into a simple for loop:</p>
  
  <pre><code>for ($x = 0; $x &lt;= 10; $x++) {
      $new_array = array("name"=&gt;'Brian', "age"=&gt;'25');
      array_push($person, $new_array);
  } 
  </code></pre>
  
  <p>If the for loop must be repeated 10 times I should have 10 rows with Brian name and age 25 but I have this result:</p>
  
  <pre><code>Array ( [1] =&gt; Array ( [name] =&gt; Brian [age] =&gt; 25 ) [value] =&gt; Array ( [name] =&gt; Brian [age] =&gt; 25 ) [0] =&gt; 0 [key] =&gt; 0 ) 
  </code></pre>
  
  <p>Am I doing something wrong with the array_push?
  Thanks</p>