title: Php multi-dimensional array from mysql result
body: <p>I have a mysql table that looks like this:</p>
  
  <pre><code>id | uid | title     | description | parent
  1  |  1  | Portraits | desc.       | photostream
  2  |  1  | Abstract  | descr.      | photostream
  </code></pre>
  
  <p>and I am trying to build a multi-dimensional array that would end up looking like this:</p>
  
  <pre><code>Array
  (
        [0]
            [id] =&gt; 1
            [uid] =&gt; 1
            [title] =&gt; Portraits
            [description] =&gt; desc.
            [parent] =&gt; photostream
        [1]
            [id] =&gt; 2
            [uid] =&gt; 1
            [title] =&gt; Abstract
            [description] =&gt; descr.
            [parent] =&gt; photostream
  )
  </code></pre>
  
  <p>I am using the select query:</p>
  
  <pre><code>$query = mysql_query(
    "SELECT * FROM `table` WHERE `uid`='1' ORDER BY `id` DESC");
  </code></pre>
  
  <p>Does anyone know how to do this?
  Thanks,
  Levi</p>