title: Putting MYSQL results into a PHP Array
body: <p>I have an array, using this structure.</p>
  
  <pre><code>$data = array(
  array("firstname" =&gt; "Mary", "lastname" =&gt; "Johnson", "age" =&gt; 25),
  array("firstname" =&gt; "Amanda", "lastname" =&gt; "Miller", "age" =&gt; 18)
  );
  </code></pre>
  
  <p>I want to read data from a MYSQL table into this array. Here is my code</p>
  
  <pre><code>$sql = "select * from mynames limit 10";
  $result = mysql_query($sql);
  $data = mysql_fetch_array($result, MYSQL_NUM);
  </code></pre>
  
  <p>The array is not filling up. Can anybody show me how to fill the array?</p>