FUDforum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » Imported messages » comp.lang.php » from mysql in associative array
Show: Today's Messages :: Polls :: Message Navigator
Return to the default flat view Create a new topic Submit Reply
from mysql in associative array [message #183966] Fri, 29 November 2013 15:31 Go to previous message
Knut Krueger is currently offline  Knut Krueger
Messages: 1
Registered: November 2013
Karma:
Junior Member
Hi to all, whats the best was to get to get one of two colums of an
database query in an array as the names of the associative array

means
mysql table
id value
1 green
2 red
3 blue
.....


should be

$array = array ( 'green ' => '1',
'red ' => '2',
'blue ' => '3' );


Regards Knut
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Regarding split text and match from data base
Next Topic: Review Copies Available for Learning FuelPHP for Effective PHP Development
Goto Forum:
  

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ]

Current Time: Sat Nov 30 10:00:56 GMT 2024

Total time taken to generate the page: 0.05865 seconds