I have a number like that : 342.50 EUR. How to table only the number : 342.50 I tried this, but it's not the result that I want
$str = '342.50 EUR';
preg_match_all('!\d+!', $str, $matches);
print_r($matches);
result : Array ( [0] => Array ( [0] => 342 [1] => 00 ) )