Click to See Complete Forum and Search --> : execute php command


diamonds
07-19-2003, 08:55 PM
I wish to execute a (internal) php command. Somthing like the exec function, but it runs php commands, like the exec in javascript. somthing like this:

$var_1='ecec';
$var_2='command';
ecec($var_1.$var_2."_();")
would run:
ececcommand_();

Is there a function in PHP that does this?

pyro
07-19-2003, 09:29 PM
Not sure what you need, but perhaps eval() (http://us2.php.net/eval)?

diamonds
07-20-2003, 01:48 PM
sorry if you didn't understtand me...
And, yes it is what I needeed!

pyro
07-20-2003, 04:14 PM
hehe... Guess I must have understood you well enough then. :D

Cheers!