I found the fonction constant that return the value of a constant if you passe the name of the constant in parameter.
so it would now be ----- $replace_by[] = constant$out[2][$i]); ----- It should also be faster then eval Thanks for the help Yann Larrivee On Thu, 2003-06-05 at 00:21, Ernest E Vogelsinger wrote: > 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