Jump to content

Calculate a string


Intelly XAD

Recommended Posts

Hi there, i've created a function that generates variate sums, for example: 5 * 4 / 20 - 5 =
This sum is saved under a string $sum="5 * 4 / 20 - 5 ="
But now I want the PHP code to calculate this sum for met is there any function available in PHP that can do this?
for example: calc($sum);

Many thnx in advance for the answers
Link to comment
https://forums.phpfreaks.com/topic/19602-calculate-a-string/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.