$str = str_replace(' billion','000000000',$str);
$str = str_replace(' million','000000',$str);
$str = str_replace(' thousand','000',$str);
$str = str_replace(' hundred','00'$str);
setlocale(LC_MONETARY, 'en_US');
$str = money_format('%i',$str);
Orbit source
share