Convert Equation from String to .....
Posted: Mon Aug 13, 2007 3:26 am
Hi Everybody,
I've a problem in my code...with no long intro
Suppose I've an array contains Equations to be shown Like this one
I make this to substitute the fieldxx in the query result and make my calculations
after that I loop in the array and explode the formulas to get the results, unfortunately it's a string and I get something like this
I think the logic is bad but I need this work ASAP
I've a problem in my code...with no long intro
Suppose I've an array contains Equations to be shown Like this one
Code: Select all
// Some query from DB
$array = array (
"Equation 1" => "field11,+,field22",
"Equation 2"=> "(,field11,+,field22,),/,field33"
);after that I loop in the array and explode the formulas to get the results, unfortunately it's a string and I get something like this
How can I make this work???? And get the result of the equationsEquation 1 = 52.02+9898
Equation 2 = (52.02+9898)/23
I think the logic is bad but I need this work ASAP