stig1 Posted June 1, 2009 Share Posted June 1, 2009 How do you count the number of value after the decimal point? For example 38.88 = 2 characters after the decimal point 38.88888 = 5 characters after the decimal point. Any ideas if this is possible? Link to comment https://forums.phpfreaks.com/topic/160562-count-number-of-values-after-decimal-point/ Share on other sites More sharing options...
Alex Posted June 1, 2009 Share Posted June 1, 2009 $decimal = 56.578; $split = explode('.', $decimal); echo strlen($split[1]); Output: 3 Link to comment https://forums.phpfreaks.com/topic/160562-count-number-of-values-after-decimal-point/#findComment-847393 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.