php number format

November 28, 2008

$var = 4938509.958

echo number_format($var, 2, ‘,’, ‘.’);

output = 4,938,509.96