Do I need to escape the ' as in:
$text = str_replace('\'', '&039;', $text);
??? without the \, I my editor acts like I haven't entered the ?> when I have.
Okay well, I just previewed this response and it doesn't show the \ I put in before the middle ' in the first part of the argument, so I'll try it and see what happens.
Thanks