For instance, French notation usually use two decimals,
comma (',') as decimal separator, and space (' ') as
thousand separator. The following example demonstrates various ways to format a number:
<?php
$number = 1234.56;
// english notation (default)
echo number_format($number), PHP_EOL;
// 1,235
// French notation
echo number_format($number, 2, ',', ' '), PHP_EOL;
// 1 234,56
$number = 1234.5678;
// english notation without thousands separator
echo number_format($number, 2, '.', ''), PHP_EOL;
// 1234.57
?>