$num = 1000000; $n1 = number_format($num); // 1,000,000 $n2 = number_format($num,2); // 1,000,000.00 $n3 = number_format($num,2,",","."); // 1.000.000,00 // Output echo "$n1 <br> $n2 <br> $n3";