Source Code:
(back to article)
<?php $mixed = [1, '2', 'three', 4, 5]; $onlyNumbers = array_filter($mixed, 'is_numeric'); print_r($onlyNumbers); ?>
Result:
Report an issue