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,997
  • 8
  • 49
  • 58
Ishpreet
  • 659
  • 5
  • 19

0 Answers0