title: For each result in MySQL query, push to array (complicated)
body: <p>Okay, here's what I'm trying to do. I am running a MySQL query for the most recent posts. For each of the returned rows, I need to push the ID of the row to an array, then within that ID in the array, I need to add more data from the rows. A multi-dimensional array.</p>
  
  <p>Here's my code thus far.</p>
  
  <pre><code>$query = "SELECT * FROM posts ORDER BY id DESC LIMIT 10"; 
  $result = mysql_query($query);
  
  while($row = mysql_fetch_array($result)){
  
              $id = $row["id"];
              $post_title = $row["title"];
              $post_text = $row["text"];
              $post_tags = $row["tags"];
              $post_category = $row["category"];
              $post_date = $row["date"];
  
  
  
  }
  </code></pre>
  
  <p>As you can see I haven't done anything with arrays yet. Here's an ideal structure I'm looking for, just incase you're confused.</p>
  
  <p>The master array I guess you could call it. We'll just call this array $posts.
  Within this array, I have one array for each row returned in my MySQL query.
  Within those arrays there is the $post_title, $post_text, etc.</p>
  
  <p>How do I do this? I'm so confused.. an example would be really appreciated.</p>
  
  <p>-Dylan</p>