Hi guys
i am trying to add currencies using php where i can see the comma of the currency like this (ex: 30,000)
i want the comma to show after every hundreds place
i can add two variables if i do not place any comma but what i want is to have a comma after adding two variables
is this possible without having to use if and else statements?
<?php
$number = 123423456.56;
// english notation (default)
$english_format_number = number_format($number);
echo $english_format_number;
echo "
";
// 1,235
// French notation
$nombre_format_francais = number_format($number, 2, ',', ' ');
echo $nombre_format_francais;
echo "
";
// 1 234,56
$number = 1234.5678;
// english notation without thousands separator
$english_format_number = number_format($number, 2, '.', '');
echo $english_format_number;
// 1234.57
?>