Warning: array_filter() expects parameter 2 to be a valid callback, function \'empty\' not found or invalid function name....
Why is e
You can use just array_filter() function without callback:
Remove empty array elements in PHP
$arr = array("PHP", "HTML", "CSS", "", "JavaScript", null, 0);
print_r(array_filter($arr)); // removing blank, null, false, 0 (zero) values
Result:
Array
(
[0] => PHP
[1] => HTML
[2] => CSS
[4] => JavaScript
)