Re: HELP!! how can arithmetic variables(string) ??

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Thank You !

"Colin Guthrie" <gmane@xxxxxxxxxxxxxx> ¼¶¼g©ó¶l¥ó·s»D:ff76fg$ii3$1@xxxxxxxxxxxxxxxx
> LKSunny wrote:
>> <?
>> $a="1+1"; //variables(string)
>>
>> //how can arithmetic variables(string) ??
>> //N ROW................
>>
>> //output
>> echo $a //i need output "2" not "1+1"
>> //Please Help, Thank You Very Much !!
>> ?>
>>
>
> You can do:
>
> eval("echo $a;");
>
> But be warned, this has "Injection Attack" written all over it!
>
> Col 

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux