Here’s a super easy way to remove empty values from an array in PHP:

In a recent project we were reading a text file and creating an array based on each new line, so we used the same method to remove any new lines that were empty.

Leave a Comment