I have string like this: $string = \"a + b + c\";. Now I would like to calculate the string as sum.
$string = \"a + b + c\";
For example:
$a = 10; $b = 10; $c =
you can do:
$string = "$res = $a + $b + $c;"; eval($string) echo($res);