You can do $ string = nl2br ($ string) so that your line break is changed to
<br />.
Then you can manipulate the string, for example. split it into first appearance
<br />
like this:
list($first, $second) = explode('<br />', $string, 2);
source
share