thecommonthread Posted March 26, 2010 Share Posted March 26, 2010 Is there a way I can create an American currency without the "USD" in there? Example: money_format('%i', $number) returns: USD 1,234.56 I'm looking for code to only return: $1,234.56 Any help is much appreciated!! Thank you! Quote Link to comment https://forums.phpfreaks.com/topic/196659-formatting-currency-correctly/ Share on other sites More sharing options...
PFMaBiSmAd Posted March 26, 2010 Share Posted March 26, 2010 number_format Quote Link to comment https://forums.phpfreaks.com/topic/196659-formatting-currency-correctly/#findComment-1032511 Share on other sites More sharing options...
DavidAM Posted March 26, 2010 Share Posted March 26, 2010 try using %n instead of %i? Look at the examples in the manual (http://us3.php.net/manual/en/function.money-format.php) Quote Link to comment https://forums.phpfreaks.com/topic/196659-formatting-currency-correctly/#findComment-1032512 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.