Re: Using two colomns of mysql data as key/value pairs in arrays

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Cpt John W. Holmes wrote:

while($r = mysql_fetch_assoc($result))
{ $array[$r['id']] = $r['name']; }

---John Holmes...

Wonderful! Thats exactly what I was looking for! I ended up taking the array out of the equation entirly as suggested by Davic T-G, but the simplicity of your answer was exactly what I needed.


--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [PHP Users]     [Postgresql Discussion]     [Kernel Newbies]     [Postgresql]     [Yosemite News]

  Powered by Linux