kneuf
01-19-2004, 09:28 PM
Hi,
I was hopeing that someone can help me with this (I've looked on PHP, but didn't really find anything): I'm trying to make a calculator script and I have 2 files so far, index.php and math.db. In index.php I have the code, and in math.db I have math expressions. I know how to parse and read it into the index.php file, that's not the problem. The math.db is in the format of:
data1::data2::data3
data3 is what I have trouble with. Say it says:
[num1]+[num2]
I need to replace [num1]+[num2] with something like 1+1. My problem is that it printes 1+1, not 2. If you can understand my question, how do you make it so that it evaluates it?
Thanks.
I was hopeing that someone can help me with this (I've looked on PHP, but didn't really find anything): I'm trying to make a calculator script and I have 2 files so far, index.php and math.db. In index.php I have the code, and in math.db I have math expressions. I know how to parse and read it into the index.php file, that's not the problem. The math.db is in the format of:
data1::data2::data3
data3 is what I have trouble with. Say it says:
[num1]+[num2]
I need to replace [num1]+[num2] with something like 1+1. My problem is that it printes 1+1, not 2. If you can understand my question, how do you make it so that it evaluates it?
Thanks.
