The explode function breaks the data in $kkkk into fragments and stores them into array whenever - is encountered. Now the problem is i want to explode the same data, whenever Enter key was used. Please help me,i got stuck for whole day.

<?php
// TO BREAK THE DATA INTO SMALL PARTS
$ooo = explode("-", $kkkk);
for($i=0;$i<count($ooo);$i++)
{
// TO READ THE FILE EXTENTION FROM EACH PART
$ext = pathinfo($ooo[$i], PATHINFO_EXTENSION);
// TO CHANGE THE CODE DEPENDING ON FILE EXTENTION
if($ext=='jpg'||$ext=='jpeg'||$ext=='png'||$ext=='gif'||$ext=='bmp')
{ $ooo[$i]="<img src=\"$ooo[$i]\"><br>"; }

}

// TO COMBINE BROKEN DATA INTO ONE
for($i=0;$i<count($ooo);$i++)
{
$ggg=implode("", $ooo);
}
?>

explode( "\r\n", $data );

in "Windows OS" or

explode( "\n", $data );

in *unix

Thanks you very much. I am now alive.