I guess maybe eval isn't even the right thing to do here... but i am having trouble getting my brain around this this morning.Basically I have a database field that holds the name of a variable. so when i do a query i get this:$data[value] is a string that contains "$variable_a" (the variable name) as text. I want $data[value] to actually hold the value of $variable_a, rather than $variable_a as a string. I can't get it to work. Any thoughts?
9/2/2005 12:45:55 PM
$fieldvalue == "$value"and$value == 5i want $fieldvalue == 5
9/2/2005 1:02:59 PM
http://www.php.net/manual/en/language.variables.variable.phpRTFM
9/2/2005 2:11:32 PM
yeah ive been reading that all day.
9/2/2005 2:49:47 PM
had to do this$fieldvalue = eval("return \$$fieldvalue;");
9/2/2005 3:06:20 PM
n00b
9/2/2005 3:47:23 PM