Jump to content

Archived

This topic is now archived and is closed to further replies.

AV1611

creating variables from row returns

Recommended Posts

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...

Share this post


Link to post
Share on other sites
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>

Share this post


Link to post
Share on other sites
You can also use the function extract(). http://www.php.net/extract

Ken

Share this post


Link to post
Share on other sites

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.