title: PHP - Make my query's array's key the ID
body: <p>So I have this array of images pulling and the array's keys are just 0,1,2,3,4,5.... and whatnot...</p>
  
  <p>How can I make the value in the 'id' column of that table the key, and keep 'link' as the value.</p>
  
  <p>Associative Array, no? </p>
  
  <p><strong>Here is my PHP:</strong></p>
  
  <pre><code>$myImageID = $me['imageid'];
  
  $findImages = "SELECT link FROM images WHERE model_id ='{$me['id']}'";
  $imageResult = mysql_query($findImages) or die (mysql_error());
  
  $myImages = array();
  while($row = mysql_fetch_array($imageResult)) {
      $myImages[] = $row[0];
  }
  </code></pre>
  
  <p><strong>Here is what I have:</strong></p>
  
  <pre><code>{
   [0] -&gt; "http://website.com/link.jpg"
   [1] -&gt; "http://website.com/li123nk.jpg"
   [2] -&gt; "http://website.com/link3123.jpg"
  }
  </code></pre>
  
  <p><strong>Here is what I want:</strong></p>
  
  <pre><code>{
   [47] -&gt; "http://website.com/link.jpg"
   [122] -&gt; "http://website.com/li123nk.jpg"
   [4339] -&gt; "http://website.com/link3123.jpg"
  }
  </code></pre>