Let's say I have strings such as:
$ten = 'ten';
$eleven = 'eleven';
$three = 'three';
etc.
Is there a pre-built function which will convert these into numeric strings based on the English language?
i.e.
return process_to_number($ten); // returns 10 as a numeric value
return process_to_number($eleven); // returns 11 as numeric
return process_to_number($three); // returns... you guessed it, 3!
I guess I could write this manually too (since I only have to process between one and sixteen) but I thought I'd check if there was something like this already.