Possible Duplicate:
Converting words to numbers in PHP
Is there a php function to convert a string such as ‘ten’ into an integer?
If not then how would you go about it?
Have tried google and php.net search with no success
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Here’s a proof of concept class that I just wrote to do this… Check it out:
And a test:
And the results:
It doesn’t support huge numbers (hence why billion is the largest power), but it should be trivially modified to support them by using the bcmath extension… If you want, I could quickly modify it to work with numbers as high as you want.