I am using tinyMCE and, rather annoyingly, it replaces all of my apostrophes with their HTML numeric equivalent. Now most of the time this isn't a problem but for some reason I am having a problem storing the apostrophe replacement. So i have to search through the string and replace them all. Any help would be much appreciated
+8
A:
did you try:
$string = str_replace("'", "<replacement>", $string);
Owen
2008-11-21 11:09:08
The very trick straight off. Thankyou very much!
Drew
2008-11-21 11:12:09
+1
A:
Is it just apostrophes that you want decoded from HTML entities, or everything?
print html_entity_decode("Hello, that's an apostophe.", ENT_QUOTE);
will print
Hello, that's an apostrophe.
RJHunter
2008-11-21 12:08:28
+1
A:
Why work around the problem when you can fix the cause? You can just turn of the TinyMCE entity encoding*. More info: here
*Unless you want all the other characters encoded, that is.
Vincent Van Den Berghe
2008-11-21 13:17:26
Cheers! Unfortunately i need to leave it on so flash can read all the other characters properly.
Drew
2008-11-21 13:52:10