Hi ppl,
Trying to decode ’ and ‘ (HTML codes) in a string back to normal ascii. Thought html_entity_decode() would decode these but it seems not.
Anybody know of anther function that will decode?
Cheers,
Mark.
$string = '‘ and ’'; $string = str_replace('‘', '‘', $string); $string = str_replace('’', '’', $string); echo $string;
its the char set
$html='decoding ‘ and ’ (HTML codes) problem '; echo html_entity_decode ( $html, ENT_QUOTES, 'cp1251');
http://uk.php.net/manual/en/function.html-entity-decode.php
Thanks ppl.
Can I just ask why it needs to decode using a Russian char set ?
Mark
you probably dont but that was the first i tried that worked
try cp1252 and some others in previous link