globex Posted December 18, 2007 Share Posted December 18, 2007 I'm dealing with money, is there a way to convert a variable containing "2" to "2.00"? Quote Link to comment Share on other sites More sharing options...
corbin Posted December 18, 2007 Share Posted December 18, 2007 http://php.net/number_format That should help. Quote Link to comment Share on other sites More sharing options...
~n[EO]n~ Posted December 18, 2007 Share Posted December 18, 2007 <?php $number = 2; echo number_format ($number, 2); ?> Oops... Quote Link to comment Share on other sites More sharing options...
globex Posted December 18, 2007 Author Share Posted December 18, 2007 Thank you Quote Link to comment 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.