Re: eval error
| From: | Chris Hayes | Date: | Mon, 10 Mar 2003 13:22:04 +0000 |
| Subject: | Re: eval error | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-138949@lists.php.net to get a copy of this message | ||
At 12:54 10-3-03, you wrote:
what problem I want to use eval in my script but its generate this error : Parse error: parse error, unexpected T_LNUMBER in C:\Projects\phpmag\admin\functions\admin_cont.php(22) : eval()'d code on line 4 eval ("\$all_types_list .= \"$all_types_list\";");For those who do not know what all the CAPITALIZED secret words in error messages mean: i found a list of them on http://www.zend.com/manual/tokens.php. A T_LNUMBER is an integer. I __suppose__ that $all_types_list contains a number, maybe 144, and while you mean to do
$all_types_list.="144";the eval function somehow evaluates
$all_types_list.=144;And .= expects a string on the right side, not an integer. Maybe someone who is more experienced with eval() can shed more light on this.