fork download
  1. <?php
  2. $output = 'text
  3. &NewLine;
  4. &NewLine;more text
  5. &NewLine;
  6. &NewLine;ja
  7. &NewLine;nein';
  8.  
  9. $explode = preg_split('/(\r\n|\r|\n)*(&NewLine;(\r\n|\r|\n)*){2}/', $output, -1, PREG_SPLIT_NO_EMPTY);
  10. var_dump($explode);
Success #stdin #stdout 0.01s 82944KB
stdin
Standard input is empty
stdout
array(3) {
  [0]=>
  string(4) "text"
  [1]=>
  string(9) "more text"
  [2]=>
  string(16) "ja
&NewLine;nein"
}