Computer ForumsComputers  

Go Back   Computer Forums > The World Wide Web > Web Graphics, design, digital images

Reply
 
LinkBack Thread Tools Display Modes
Old 08-26-2005, 05:26 PM   #1 (permalink)
Newb Techie
 
Join Date: Aug 2005
Posts: 2
Default PHP Mysql Select all of 1 Column, name variables with another column

I know how to use php's mysql functions to retrive 1 row of coding, but how would I go about making an array with the array's variable names coming from one column, and the array's variable values coming from another, correspondingly?

Thanks!
lemonshindig is offline   Reply With Quote
Old 08-28-2005, 01:34 PM   #2 (permalink)
Newb Techie
 
Join Date: Aug 2005
Posts: 2
Default

Well... I think I figured out the solution to my problem.

while ($currentrow=mysql_fetch_array($result)) {
$flags[$currentrow['country']] = $currentrow['flag'];
}


I think that will work... but i haven't been able to test it yet, because i'm having trouble logging into the database.

Thanks
lemonshindig is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT -5. The time now is 05:54 PM.


Powered by vBulletin® Version 3.7.1
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.1.0