hellouthere Posted August 28, 2007 Share Posted August 28, 2007 I am pulling numbers from a database which have large amounts of decimal places by default (need to be left this way) Therefore some numbers come out as 50.00000 or 0.34000 I would like to be able to remove the trailing zeros and decimal point if appropriate to tidy up the variables for display... Thanks, In advance Quote Link to comment https://forums.phpfreaks.com/topic/67044-strip-down-variable/ Share on other sites More sharing options...
trq Posted August 28, 2007 Share Posted August 28, 2007 printf(). Quote Link to comment https://forums.phpfreaks.com/topic/67044-strip-down-variable/#findComment-336205 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.