Skip to content

Instantly share code, notes, and snippets.

@hlassiege
Created May 3, 2018 09:27
Show Gist options
  • Save hlassiege/cf1d4f293498ce1d05c3f30758b6cea4 to your computer and use it in GitHub Desktop.
Save hlassiege/cf1d4f293498ce1d05c3f30758b6cea4 to your computer and use it in GitHub Desktop.
format.php
$number = 1234.56;
// Notation anglaise (par défaut)
$english_format_number = number_format($number);
// 1,235 Notation française
$nombre_format_francais = number_format($number, 2, ',', ' ');
// 1 234,56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment