php - preg_replace with style format issue -



php - preg_replace with style format issue -

i have text stored in databse:

<div style=\"font-family:arial black;font-size:20px;text-align:center;color:#3333ff;font-weight:700;\">testing editor</div>

now when trying process website editor i'm using function:

function striplen($text) { // strip slashes $text = stripslashes($text); // find errors quote $errors = array("#\r\n#", '#"#'); // find right self content $corrected = array('\r\n', ''); homecoming preg_replace($errors, $corrected, $text); }

this out set text this:

<div style=font-family:arial black;font-size:20px;text-align:center;color:#3333ff;font-weight:700;>testing editor</div>

as can see double quotes style tag disappeared?

any suggestions?

many thanks,

php

Comments

Popular posts from this blog

web services - java.lang.NoClassDefFoundError: Could not initialize class net.sf.cglib.proxy.Enhancer -

Accessing MATLAB's unicode strings from C -

javascript - mongodb won't find my schema method in nested container -