I've got the following code:
$output2 = 'text

more text

ja';
$explode = explode('

', $output);
This works fine and the $explode
array prints the following:
Array
(
[0] => text
[1] => meer text
[2] => ja
)
However, the following code doesn't work and I don't know how to fix it:
$output = 'text



more text



ja';
$explode = explode('

', $output);
The $explode
array prints the following:
Array
(
[0] => text



 //more text



ja
)
This might seem like a weird question. But the first example is a test I made manually. But the second example is what is actually returned from the database.
You can use preg_split
to split your string:
<?php
$output = 'text



more text



ja';
$explode = preg_split('/(
|(
||
))+/', $output, -1, PREG_SPLIT_NO_EMPTY);
demo: https://ideone.com/KU0v9t (ideone) or https://eval.in/887393 (eval.in)
The following solution to split on double 

:
$output = 'text



more text



ja

nein';
$explode = preg_split('/(
||
)*(
(
||
)*){2}/', $output, -1, PREG_SPLIT_NO_EMPTY);
Adding one line in your code $output =str_replace(" ","",$output );
to combine all string in one line so that it would like your first example.
$output =str_replace("
","",$output );
$explode = explode('

', $output);
print_r($explode);
Live demo : https://eval.in/887371
$explode = preg_split('/
\s*
/', $output);
normalize your string by removing all new line like chars:
$output = trim(preg_replace('/\s+/', '',$output));
then explode it.
As User2486 says, the problem is that there are some hidden characters you are not watching like and
In your first example you have
'text

more text

ja'
and in the second
'text



more text



ja'