PHP_EOL is ostensibly used to find the newline character in a cross-platform-compatible way, so it handles DOS/Unix issues.
Try this:
$myString = "Prepare yourself to be caught
You in the hood gettin' shot
We going throw hell of blows
got my whole frame froze";
$myArray = explode(PHP_EOL, $myString);
print_r($myArray);
$uniquepattern="@#$;?:~#abcz"//Any set of characters which you dont expect to be present in user input $_POST['skuList'] better use atleast 32 charecters.
$skuList=explode($uniquepattern,str_replace("\r","",str_replace("\n",$uniquepattern,$_POST['skuList'])));
try
Have you tried using double quotes?
Try this:
This method always works for me:
Try this:
For a new line, it's just
For a new line and carriage return (as in Windows files), it's as you posted. Is your skuList a text area?