Here’s how you can remove empty or whitespace elements in your array, and also reindex the array at the same time. Use array_filter to remove the unwanted elements, and array_values to reindex the elements. $arr = array_values( array_filter($arr, function($item) {…
Programming, Security and Tech (and Code Snippets)