Call-911 Posted March 30, 2011 Share Posted March 30, 2011 Hello All, I have the following Database Columns: Name, Phone, Email, Keyword What I want to do is store all values in the database based off of the "keyword", so if Row 1 is "John Doe, 123-456-7890, johndoe@yahoo.com, President", then I want to store the following variables: $Presidentname = John Doe $Presidentphone = 123-456-7890 $Presidentemail = johndoe@yahoo.com It seems like it should be easy enough to query a database and assign these variables easily, but I am somehow missing it.... Thanks! Link to comment https://forums.phpfreaks.com/topic/232227-store-query-values-as-variables/ Share on other sites More sharing options...
betterphp Posted March 30, 2011 Share Posted March 30, 2011 mysql_fetch_assoc will return an array containing all of the columns. So you can work directly with those elements. Link to comment https://forums.phpfreaks.com/topic/232227-store-query-values-as-variables/#findComment-1194664 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.