When taking data from a HTML form and storing a value in a serialised array if there is a new line the serialisation is going wrong with mysql_real_escape_string.
for example this outputs a string of the wrong length also plus the new line has been removed
$value="new\r\nline";
mysql_real_escape_string($value);
$array=array();
$array[0]=$value;
$array=serialize($array);
echo $array;
prints out a:1:{i:0;s:9:"new line";}
mysql_real_escape_stringreturns the escaped value.. you don’t use the returned value, so why are you complaining about it?also, if you check the output in the browser, you won’t see the newline. check the generated source.