PHP

Splitting Text by EOL

A line break is defined differently on different platforms, \r\n, \r or \n.

$array = preg_split ('/$\R?^/m', $string);

done

Leave a Reply