Posted By

blackf0rk on 07/11/09


Tagged

php format money currency


Versions (?)

Who likes this?

2 people have marked this snippet as a favorite

vali29
silentbob84


Format Currency


 / Published in: PHP
 

  1. $double = 1.5;
  2. $price = "$".number_format($double,2);
  3. #returns "$1.50"

Report this snippet  

You need to login to post a comment.