remove null values from array laravel code example
Example: php remove empty values from array
$array = array_filter($array, function($a) {
return trim($a) !== "";
});
$array = array_filter($array, function($a) {
return trim($a) !== "";
});