okay, i see....

here is an example:

$php_code = "$foo + $bar";
eval("\$var = \"$php_code\";);

now in $var there should be the eval of $foo + $bar


-----Ursprüngliche Nachricht-----
Von: Robert S. White [mailto:[EMAIL PROTECTED]]
Gesendet: Mittwoch, 24. Januar 2001 16:20
An: [EMAIL PROTECTED]
Betreff: Re: [PHP] eval() to string???


How is this going to help me?

I want to evaluate the code in $php_code to *another* string...


----- Original Message -----
From: Thomas Weber <>
To: Php-General <>
Sent: Wednesday, January 24, 2001 10:14 AM
Subject: AW: [PHP] eval() to string???


> try
>
> eval("\$php_code;");
>
> -----Ursprüngliche Nachricht-----
> Von: [ rswfire ] [mailto:[EMAIL PROTECTED]]
> Gesendet: Mittwoch, 24. Januar 2001 15:36
> An: [EMAIL PROTECTED]
> Betreff: [PHP] eval() to string???
>
>
> I want to evaluate some PHP code to a string.  How can I do this?
>
> $php_code = "echo 'hello';"
>
> I would like to evaluate the code to "hello" in another string...
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]


_________________________________________________________
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to