Jump to content

Echoing Decimal Place Only?


ShoeLace1291

Recommended Posts

Ok, I'm trying to make a 5 star rating system so I need to find out what the decimal place is and whether or not to round to .5 or to .0.  How do I display just the decimal place?

 

Example:

3.7

 

how do i just find the 7?

 

I thought about using substr, but that would only work if the decimal places would be the same length.

Link to comment
https://forums.phpfreaks.com/topic/117693-echoing-decimal-place-only/
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.