At 13:46 04.06.2003, Yann Larrivee said: --------------------[snip]-------------------- >My probleme is that i need to return the value of my define and not its >name. My eval doesnt seem to work. > >Any body as a sugestion , or a better way to do this without passing by >eval . > > $replace_by[] = eval("echo \$out[2][$i];"); --------------------[snip]--------------------
echo'ing the value wouldn't work here - you want the value part of your defined name in a variable. You need this assignment within the eval: eval('$replace_by[] = ' . $out[2][$i] . ';'); After this eval, the $replace_by array will contain the correct value. -- >O Ernest E. Vogelsinger (\) ICQ #13394035 ^ http://www.vogelsinger.at/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php