Posts: 3,621
Name: Thierry
Location: I'm the uber Spaminator !
|
Then you'll have to resort either to eval() if the formula is not too complex
PHP Code:
//Be sure to have defined the value of T, and take care of precedences rules on $d*$d-$h. //I would encapsulate them in () to be sure of that eval("\$ret=T/4($d*$d-$h)"); echo $ret;
or you will need to extract the datas from the string, and send them to a PHP rewritten formula.
PHP is not able to create a full formula out of a string representation.
You will have to rebuild it using PHP native functions.
__________________
Only a biker knows why a dog sticks his head out the window.
|