title: Pulling mysql data into a multidimensional array
body: <p>I've checked all kinds of previously answered similar questions and nothing's working.  I have a "Inbox" type application where a person of emailaddress@xyz.com might have 5 messages waiting for them.  They log in and get a screen of those five messages, the sender email, the date sent, and the first 15 chars of the message.  </p>
  
  <p>In mysql, I have:  id, emailaddress, senderemail, datesent, fullmessage.</p>
  
  <p>I'm using <code>SELECT * FROM db WHERE emailaddress='emailaddress@xyz.com'</code> to pull out, let's say, 5 new messages. <code>$result</code> equals the mysql query.  <code>mysql_num_rows</code> does a great job of telling me there are 5 rows.  It works fine up to that point.</p>
  
  <p>My problem is that I can't (despite hours of trying) find the right syntax for making this into a multidimensional array so that I can iterate table rows in a for loop and print it all out.  I'm envisioning:</p>
  
  <pre><code>&lt;table&gt;
  for ($a = 0; $a &lt; $numrows; $a++) {
  &lt;tr&gt;
       the php code would go here and would print the associated sender, date, and message in &lt;td&gt; cells.
  &lt;/tr&gt;
  }
  &lt;/table&gt;
  </code></pre>
  
  <p>Any help would be fantastic.</p>
  
  <p>I'm sure this is not hard but have just not gotten anywhere for most of the afternoon.  Can anyone out there tell me what a simple syntax for doing this would be?</p>