Jump to content

[SOLVED] Rounding a number?


ERuiz

Recommended Posts

Hello guys and gals,

 

Please don't laugh, since I know this will be an easy question, but how can I make this value:

 

$fuel = "19312.92";

 

end up looking like this:

 

$fuel = "193";

 

And if possible, always insert a ZERO in front of the result, so that it ends up looking like this:

 

$fuel = "0193";

 

Ok, stop laughing now. LMAO!

 

Thanks for any help as always!

Link to comment
https://forums.phpfreaks.com/topic/75445-solved-rounding-a-number/
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.