Visto che ormai hai postato qui puoi utilizzare la funzione di php
number_format()
Eccoti il link. Non dovresti avere problemi.
http://freephp.html.it/articoli/view...p?id=151&pag=4