I have a string called $output
which returns a list like this
Object One
Object Two
Object Three
Object Four
Object Five
Object Six
I want to turn this into an array using explode like this:
explode("\n", $output);
However, there are lots of blank lines and random white spaces in the beginning. Is there a way to remove all of this so that I am left with a usable array?