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

From: Date: Thu, 18 Oct 2007 15:33:39 +0000
Subject: Re: Re: HELP!! how can arithmetic variables(string) ??
References: 1 2  Groups: php.general 
Request: Send a blank email to php-general+get-263317@lists.php.net to get a copy of this message
Colin Guthrie wrote: > 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;"); you realise Sunny stopped reading at this point. some people should not be given guns. ;-) > > But be warned, this has "Injection Attack" written all over it! > > Col >

« previous php.general (#263317) next »