AW: [PHP] eval() to string???

From: Date: Wed, 24 Jan 2001 15:30:59 +0000
Subject: AW: [PHP] eval() to string???
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-36422@lists.php.net to get a copy of this message
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:rswfire@yahoo.com] Gesendet: Mittwoch, 24. Januar 2001 16:20 An: php-general@lists.php.net 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:rswfire@hotmail.com] > Gesendet: Mittwoch, 24. Januar 2001 15:36 > An: php-general@lists.php.net > 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: php-general-unsubscribe@lists.php.net > For additional commands, e-mail: php-general-help@lists.php.net > To contact the list administrators, e-mail: php-list-admin@lists.php.net _________________________________________________________ Do You Yahoo!? Get your free @yahoo.com address at http://mail.yahoo.com

« previous php.general (#36422) next »