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); 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 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 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
Archived
This topic is now archived and is closed to further replies.