Skip to content

Instantly share code, notes, and snippets.

@donaldallen
Created February 8, 2013 00:15
Show Gist options
  • Save donaldallen/4735483 to your computer and use it in GitHub Desktop.
Save donaldallen/4735483 to your computer and use it in GitHub Desktop.
PHP NumberFormatter
$f = new NumberFormatter("en", NumberFormatter::SPELLOUT);
echo $f->format(123456);
// returns "one hundred twenty-three thousand four hundred fifty-six"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment