Nuv Posted June 25, 2011 Share Posted June 25, 2011 After using round function i got €128.7 . Is there any ready made function to get get 128.70 ? (with a trailing 0). I can change it using regex by [0-9]+(\.[0-9][0-9]) (totally guessing)but is there any function to do so ? $BP = round(128.6985 , 2); Quote Link to comment https://forums.phpfreaks.com/topic/240377-trailing-zer0-after-using-round-function/ Share on other sites More sharing options...
kenrbnsn Posted June 25, 2011 Share Posted June 25, 2011 Look at number_format Ken Quote Link to comment https://forums.phpfreaks.com/topic/240377-trailing-zer0-after-using-round-function/#findComment-1234705 Share on other sites More sharing options...
Nuv Posted June 25, 2011 Author Share Posted June 25, 2011 I knew about that ! Thankyou Quote Link to comment https://forums.phpfreaks.com/topic/240377-trailing-zer0-after-using-round-function/#findComment-1234711 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.