Is there any php function to convert textual numbers to numbers? For example: convert("nine") outputs 9
<blockquote>
  <p><strong>Possible Duplicate:</strong><br>
  <a href="http://stackoverflow.com/questions/1077600/converting-words-to-numbers-in-php">Converting words to numbers in PHP</a>  </p>
</blockquote>



<p>I need a function to convert textual numbers to numbers.
For example: convert("nine") outputs 9</p>

<p>I know I could write a function like for example if ($number == "one") { $number = 1; } etc...
but that would be a lot of work.</p>
