I have this text stored in my databse:
<div style=\"font-family:arial black;font-size:20px;text-align:center;color:#3333ff;font-weight:700;\">testing editor</div>
now when trying to process it to my website editor I'm using this function:
function striplen($Text)
{
// strip slashes
$Text = stripslashes($Text);
// find the errors quote
$errors = array("#\r\n#", '#"#');
// find the correct self content
$corrected = array('\r\n', '');
return preg_replace($errors, $corrected, $Text);
}
this out put the text like this:
<div style=font-family:arial black;font-size:20px;text-align:center;color:#3333ff;font-weight:700;>testing editor</div>
as you can see the double quotes from the style tag disappeared?
any suggestions?
many thanks,