Quote:
Originally Posted by Programmer
I believe he's trying to do something like so:
PHP Code:
temp.var1 = 4; temp.str = "temp.var1 + 1"; temp.value = int(temp.str);
echo(temp.value);
// he wants it to return 5, but it returns -1, naturally.
Would be interesting to figure this out. Graal needs an eval() function.
|
I don't see why we need to parse a string if we're doing simple math...
text*15 or float(text)*15 should suffice, but if there's something I'm missing here, might I recommend
this script (though I hate to plug my own script

). It has the necessary code to do this, probably
PHP Code:
temp.result = where_param_format("","",whatever_text,15,"times");
Not totally sure on this though.
Though, I'm willing to help make a limited eval() if there is enough demand for it.