HTML Character Conversion
Posted: Fri Oct 31, 2008 5:25 pm
I'm in need of a function that can convert between html character codes e.g. $ for $ and plain text, and it needs to be the whole character set, not just some of them. So before I start the laborious process of writing a very long replacements list I thought I'd check to see if anyone else has one.
I was going to use the list at http://www.ascii.cl/htmlcodes.htm, is this the full set?
Also, what is the best way to go about this? I was just going to do loads of str_replace, but I realize that in this situation it may be flawed in that it will replace characters in the replacements.
If someone out there can save me from a lot of wasted time then please do
I was going to use the list at http://www.ascii.cl/htmlcodes.htm, is this the full set?
Also, what is the best way to go about this? I was just going to do loads of str_replace, but I realize that in this situation it may be flawed in that it will replace characters in the replacements.
If someone out there can save me from a lot of wasted time then please do