noahyamen Posted April 26, 2011 Share Posted April 26, 2011 Tried a number of different things but can't seem to get the decimal to show the 0 if the decimal is only a single digit. Currently using: $conversion = number_format("$conversion",2); Thanks Quote Link to comment https://forums.phpfreaks.com/topic/234735-need-money_format-to-output-12345-to-123450/ Share on other sites More sharing options...
noahyamen Posted April 26, 2011 Author Share Posted April 26, 2011 Nevermind, i had it right. Just in the wrong place in my cod. Duh Quote Link to comment https://forums.phpfreaks.com/topic/234735-need-money_format-to-output-12345-to-123450/#findComment-1206291 Share on other sites More sharing options...
PFMaBiSmAd Posted April 26, 2011 Share Posted April 26, 2011 What you posted works and prints 1,234.50 If it doesn't work for you, then you would need to post your actual code that demonstrates the problem. Quote Link to comment https://forums.phpfreaks.com/topic/234735-need-money_format-to-output-12345-to-123450/#findComment-1206292 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.