br3nn4n Posted March 5, 2008 Share Posted March 5, 2008 I'm thinking maybe use trim() but not sure where to go with that. I'm working on doing percentages for a poll and the number resulting for one of the results is 3.33333333333%. I want that to only be maybe 3.33%. How do I do that? Thanks much! Link to comment https://forums.phpfreaks.com/topic/94583-cut-down-a-number-to-only-a-certain-number-of-digits/ Share on other sites More sharing options...
wildteen88 Posted March 5, 2008 Share Posted March 5, 2008 number_format or round Link to comment https://forums.phpfreaks.com/topic/94583-cut-down-a-number-to-only-a-certain-number-of-digits/#findComment-484313 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.