I’ve had multiple occasions when I encounter an array with empty elements that need to be skipped or removed before further parsing can continue.
A simple for loop will work, but that seems a little excessive since PHP has a ton of array functions.

This is short, sweet, and to the point. It removes our newlines and removes empty string elements from the array.
I’d be happy to see anyone else post alternatives as comments, that provide the same functionality of course.