Im using WYSIWYG-Editor to allow my users to edit and save texts
when I save text to file and then read it, it ads "\n\n" to the output
this is because the text contains \n\n in it when the WYSIWYG saves it
I tried using those functions to read it correctly:
Code: Select all
$content = addslashes(preg_replace('`[\r\n]`','\n',$content));
$content = stripslashes ($content);
$content = str_replace("\n", "<br>", $content);
$content = nl2br($content);
I can not get reed of the \n\n
any suggestions?