I have string like this: $string = "a + b + c";
. Now I would like to calculate the string as sum.
For example:
$a = 10;
$b = 10;
$c = 10;
$string = "a + b + c";
echo "Result is ".$string;
output-> Result is 30
$string = "a + b * c";
echo "Result is ".$string;
output-> Result is 110
Thanks in advance