phpstringnumberstext-parsing

Convert number into equivalent number as English phrase


I want to convert a number into a string using PHP. Let's say I want to convert "25,435" into twenty five thousand four hundred thirty five.

Any idea how?


Solution

  • There's nothing in PHP by default to do this, but you can quite easily find something by Googling for "PHP number to word".

    http://www.krishnasrikanth.com/portfolio/works.php?app=numbwordter

    http://www.phpro.org/examples/Convert-Numbers-to-Words.html