0

I am working on a chatbot using some natural language. I want to ask something like "how many would you like" and interpret their response.

If they respond back with "two" I need to interpret that as 2
If they respond back with "six hundred and forty two" I need to interpret it as 642

Does PHP have any built-in features for this like they do with dates (strotime)?

Developer Gee
  • 362
  • 3
  • 12
  • No there is no built-in features like that, but you could implement it.. or [copy paste it](https://stackoverflow.com/questions/13651340/converting-words-to-numbers-in-php-ii) – Lawrence Cherone Apr 14 '22 at 20:24

0 Answers0