0

I have a string with following statement:

$expr = "20 * 10 + 5";
echo $expr; 

If I print the above string, then it shows me following output:

20 * 10 + 5

If I do as echo (float)$expr then it shows wrong output as 20

I want full calculated value as 205

Alon Eitan
  • 11,914
  • 8
  • 48
  • 57
Ishpreet
  • 689
  • 5
  • 17

0 Answers0