$arr = [1, 'a', 'b', 2]; filterNumbersFromArray($arr); print_r(array_values($arr)); code example
Example: php array_values
<?php
$array = array("size" => "XL", "color" => "gold");
print_r(array_values($array));
?>
// ["XL","gold"]
<?php
$array = array("size" => "XL", "color" => "gold");
print_r(array_values($array));
?>
// ["XL","gold"]