I have tried everything but answer is probably much simple. Variable $data['phone'] is for example 954a23589 and I want only numbers so ill get them.
$phoneW = strval($data['phone']);
preg_match_all('!\d+!', $phoneW, $matches);
print_r(array_values($matches)); echo '<br /><br />';
The output is
Array ( [0] => Array ( [0] => 954 [1] => 23589 ) )
I want everyone of them together as string or int (does not matter).