PHP Program To Format The Number
Write PHP Program to format the number
<!-- Write a programme to find number format of given float number --> <html> <body> <?php $n = 1999.5267; echo "Number : ".$n; $formattedNum = number_format($n); echo "<br>The number is : ".$formattedNum ; $formattedNum = number_format($n, 2); echo "<br>The number is : ".$formattedNum ; ?> </body> </html>
Output:
Number : 1999.5267
The number is : 2,000
The number is : 1,999.53