AV1611 Posted July 6, 2006 Share Posted July 6, 2006 if a query has this for the row return:$row['Column1'] etc...is there a way to create a variable not with the value of Column1, but so the $var contains "Column1" as the value...i.e. I would want $var=="Column1" to be true... Hope that makes sense... Link to comment https://forums.phpfreaks.com/topic/13837-creating-variables-from-row-returns/ Share on other sites More sharing options...
CheesierAngel Posted July 6, 2006 Share Posted July 6, 2006 You can use the php function key() to do things like this.<a href="http://be.php.net/manual/en/function.key.php">http://be.php.net/manual/en/function.key.php</a> Link to comment https://forums.phpfreaks.com/topic/13837-creating-variables-from-row-returns/#findComment-53809 Share on other sites More sharing options...
kenrbnsn Posted July 6, 2006 Share Posted July 6, 2006 You can also use the function extract(). http://www.php.net/extractKen Link to comment https://forums.phpfreaks.com/topic/13837-creating-variables-from-row-returns/#findComment-53814 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.