Re: Eval statement
| From: | John | Date: | Mon, 09 Apr 2001 09:57:04 +0000 |
| Subject: | Re: Eval statement | ||
| References: | 1 | Groups: | php.db |
| Request: | Send a blank email to php-db+get-8381@lists.php.net to get a copy of this message | ||
Hello,
Eval must be a statement, not an expression.
eval("\$result=$number1+$number2;");
print $result;
John
""Bartek Pawlik"" <pawlikb1@poczta.onet.pl> wrote in message
news:003101c0c0d6$48546a40$539f4dd5@administrator...
Hi,
Sorry, but it's no connected with PHP+DB, but I can't find answer enywhere
Supouse I have
$number=123;
what i want is
eval ("$kg"+$number) and print it.
PS. $number takes different values;
Thanks in advance
Bartek Pawlik
Poland
--