Answers for "php number format dot to comma"

PHP
1

number format comma php

<?php

$number = 1234.56;

// english notation (default)
$english_format_number = number_format($number);
// 1,235

// French notation
$nombre_format_francais = number_format($number, 2, ',', ' ');
// 1 234,56

$number = 1234.5678;

// english notation with a decimal point and without thousands seperator
$english_format_number = number_format($number, 2, '.', '');
// 1234.57

?>
Posted by: Guest on December-15-2021
0

format money with commas in php

<?php
function CurrencyFormat($number)
{
   $decimalplaces = 2;
   $decimalcharacter = '.';
   $thousandseparater = ',';
   return number_format($number,$decimalplaces,$decimalcharacter,$thousandseparater);
}
?>
Posted by: Guest on December-04-2020
0

number format without comma php

number_format(1000.5, 2, '.', '');
Posted by: Guest on August-17-2021

Code answers related to "php number format dot to comma"

Browse Popular Code Answers by Language