usadarts Posted February 19, 2008 Share Posted February 19, 2008 Hello All, I have a field within a database that is set as a text field. When outputting, I want to force in comma's when needed. I do not need decimal positions. Do I have to convert this to a numeric field first? How would I go about doing this without changing the field attributes in the database itself? David Quote Link to comment Share on other sites More sharing options...
duclet Posted February 19, 2008 Share Posted February 19, 2008 Take a look at the function number_format. It should be able to do the trick: http://us2.php.net/manual/en/function.number-format.php Quote Link to comment Share on other sites More sharing options...
kenrbnsn Posted February 19, 2008 Share Posted February 19, 2008 Look at the number_format() function. Ken Quote Link to comment Share on other sites More sharing options...
usadarts Posted February 19, 2008 Author Share Posted February 19, 2008 Duh....that was easy. 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.