Last active
November 19, 2020 14:34
-
-
Save makingthingswork/3753059a048dbd0d66e65c321c0042eb to your computer and use it in GitHub Desktop.
Remove empty indexes from array
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
function remove_empty_index(array arr) { | |
return array_filter(arr, 'strlen'); | |
} | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment