Re: [PHP] Eval var from query

2003-07-14 Thread David Nicholson
Hello, This is a reply to an e-mail that you wrote on Mon, 14 Jul 2003 at 20:15, lines prefixed by '>' were originally written by you. > eval($data) > returns Parse error: parse error, unexpected T_STRING in > C:appsapache2htdocstestquery.php(23) : eval()'d code on line 1 What are the exact conte

Re: [PHP] Eval var from query

2003-07-14 Thread David Nicholson
Hello, This is a reply to an e-mail that you wrote on Mon, 14 Jul 2003 at 20:03, lines prefixed by '>' were originally written by you. > How can I evaluate a var that is from a text field of a database? > Example: > MySQL field `name` = hi my name is $name > In my script I have: > $name = "Shawn"

Re: [PHP] Eval var from query

2003-07-14 Thread Marco Tabini
On Mon, 2003-07-14 at 15:03, Shawn McKenzie wrote: > How can I evaluate a var that is from a text field of a database? Example: > Hi Shawn-- Have you looked at eval? http://www.php.net/eval. Cheers, Marco -- php|architect -- The Magazine for PHP Professionals NOW AVAILABLE IN PRINT! Get y

[PHP] Eval var from query

2003-07-14 Thread Shawn McKenzie
How can I evaluate a var that is from a text field of a database? Example: MySQL field `name` = hi my name is $name In my script I have: $name = "Shawn"; After fetching a query result as an associative array I have the contents of the `name` field in $data If I echo $data I get: hi my name i