. , , .
, :
function isNumber($array_element) {
return is_numeric($array_element);
}
and then call this test function using array_filter
if (array_filter($arr, 'is_number') {
}
Have you written the function 'is_string ()'? If not, it array_filter($arr, 'is_string')may not work as you think.
source
share