Explode an Array that has a new line in it in PHP
15:39 26 Aug 2014

I have an array that is separated by "|". What I wanna do is separate by this identifier.

The array is as follows:-

myid1|My Title|Detailed Description
myid2|My Title|Second Row Description
myid3|My Title|Third row description

What I did was that I just used explode on it to get my desired results.

$required_cells = explode('|', $bulk_array);

But the problem is (as shown below) that only my first array is properly exploded and the next first cell of the next array is mixed due to the "new line".

Is it possible that I can get the upper array in consecutive array cells?

Array
(
    [0] => myid1
    [1] => My Title 
    [2] => Detailed Description
myid2
    [3] => My Title 
    [4] => Second Row Description
myid3
    [5] => My Title 
    [6] => Second Row Description
)
php arrays