Page 1 of 1

using html_entitiy_decode

Posted: Tue Apr 28, 2009 10:01 pm
by kendall
hey guys...quick question on the function...

I'm using it to "decode" an htmlentities string but for some reason It doesn't decode the – and „. I practically had to do a str_replace for the most part in getting it converted.

What gives with this function? :dubious: :?:

Re: using html_entitiy_decode

Posted: Wed Apr 29, 2009 12:06 am
by requinix
If get_html_translation_table doesn't know about the entity then PHP doesn't know either. And, of course, if it doesn't know then you can't expect it to do the conversion.

Until PHP's list of entities is updated you'll need to find another way. Do an html_entity_decode then your own set of str_replaces, or find a package out there that can do it all for you (I don't know of any).