I didn't realize the HTML tags I entered would screw up the page, so here it is again without the tags:
I need to be able to convert special characters to be HTML compliant. I don't want to use htmlspecialchars() because the string contains tags like "bold" and "italic", so i'm trying to use str_replace() with arrays...but i can't get it to work.
$String = str_replace(array(""", "'", "&", "<br />"), array("\"", "'", "&", "\n"), $String);
What am I doing wrong?
If I were to 4 seperate calls to str_replace() with strings instead of arrays, would the code be faster or slower?