Hello,
I’ve got a little issue. I’m thinking of putting a small equation into database and I need the code to handle it. For example, the DB entry could be: 3*$a + 6
And I need the code to replace $a with number (another value got from elsewhere in database) and to get a result.
Is this possible? From what I know, PHP would handle this as regular string, so I won’t get any result
Thanks in advance
Asaru
If its just 1 variable, try str_replace()
Well, this only helped to get a string like “3 * 2 + 6”, if $a was 2.
But I need it to return 12 instead.