Re: Mathematical expression calculation function?

From: Date: Thu, 22 Apr 2004 12:35:48 +0000
Subject: Re: Mathematical expression calculation function?
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-184213@lists.php.net to get a copy of this message
Take a look at eval(): http://de2.php.net/manual/en/function.eval.php Regards, Torsten "Enfors Christer" <chenf@wmdata.com> wrote in message news:CBFF89733A2EB34B88BD7A12BC575A8E0327A232@WMRI000044.corp.wmdata.net... Hi. I need a function that takes a mathematical expression in the form of a string, and calculates the result. PHP itself doesn't seem to provide one. I need something which can handle strings like: 10*73.2+3-(4*358.2874)/352 ... and so on. If it handles functions (like cos(), pow(), exp()) too, then that would be great. I'd appreciate any help. Thanks in advance.

« previous php.general (#184213) next »