Example Text: This will be stored in the $_POST['x'] variable
This is sentence one.
This is sentence two.
This is sentence three.
If I run this code below It will return an array with only one element
$x= mysqli_real_escape_string($db, $_POST['x']);
$y= preg_split("/(
|
|)/", $x);
But if I run this code below it will split it correctly into all 3 elements.
$x = $_POST['x'];
$y= preg_split("/(
|
|)/", $x);
Has anyone else experienced this phenomenon? Why does it happen?