PHP - text to array by splitting at line break
- by aSeptik
Hi All!
need help on splitting a large file at line break
example:
TEXT:some normal text
TEXT:some long text here, and so on... sometimes
i'm breaking down and...
TEXT:some normal text
TEXT:some normal text
ok, now by using
preg_split( '#\n(^\s)#' , $text );
i get
[0] => Array
(
[0] => some normal text
[1] => some long text here, and so on... sometimes
[2] => some normal text
[3] => some normal text
)
As you can see the [1] Element of the Array is cutted off!
what Regex can get the entire line and also split at line break!?