[eluser]Pascal Kriete[/eluser]
There are a few php options I can think of.
Code:
$whatever = explode("<!-- pagebreak -->", $full_string)[0];
$whatever = wordwrap($full_string, stripos($full_string, "<!-- pagebreak -->");
//If you're using php 6
$whatever = stristr($full_string, "<!-- pagebreak -->", TRUE);
Stupid haystack/needle string/array switcheroo.