I'm trying to explode a string that has more than 1 newline. More specifically, 2 newlines, and I'm not sure how to do it. For example:
$text = "
text1
text2
text3
";
$text = explode(PHP_EOL, $text);
There would be some empty indexes in the array after this. I need to explode at 2 newlines instead of one. How do I do that?