Re: How to convert a string into a mathematical expression?

From: Date: Fri, 13 Jul 2001 17:14:57 +0000
Subject: Re: How to convert a string into a mathematical expression?
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-57762@lists.php.net to get a copy of this message
Take a look at the eval() function. On Fri, 13 Jul 2001, Christodoulou Demetris wrote: > Hi list. > I have string variables that contain mathematical expressions. These > strings are submitted through forms. > For example if a user inserts the following-> 1+cos(0.3)*x into a text field > with name expression in an HTML form then > what i get on the server is the string variable $expression whose values is > "1+cos(0.3)*x" > > Is there a way to convert the string variable, $expression, into a > mathematical expression that can be calculated? > Thanks in advance. > DX. > > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net > For additional commands, e-mail: php-general-help@lists.php.net > To contact the list administrators, e-mail: php-list-admin@lists.php.net >

« previous php.general (#57762) next »