I have string:
'$a["m"]*$a["m"]' And I want to do, that $a["m"] turn to its value (for example 5) and my program do the operation (so it will be 5*5 so 25).
EDIT:
I know, I can do this like:
$a["m"].'*'.$a["m"] But I don't want to ;) I can't. It will be in a string some time and then I plan to calculate that (when all of variables will have values).
I'm making something like "formulas calculator". I write formula in string and now, when my program works, and all of needed data is set, I can calc this string. All of these formulas will be in database, so I get this as a string.
Sorry, I didn't tell exactly what is the problem.
eval.. This is such a dangerous code if you do not know how to correctly use it, judging from the question.. I don't believe the OP will hold such knowledge