scarhand Posted February 5, 2011 Share Posted February 5, 2011 Heres my code: $string = 'It'; html_entity_decode($string); echo $string; It should be echoing "It", but its just echoing the ASCII codes. Am I using the wrong function? I also tried htmlspecialchars_decode and it changes nothing. Quote Link to comment https://forums.phpfreaks.com/topic/226812-html_entity_decode-not-decoding-ascii/ Share on other sites More sharing options...
sunfighter Posted February 5, 2011 Share Posted February 5, 2011 Works for me. Quote Link to comment https://forums.phpfreaks.com/topic/226812-html_entity_decode-not-decoding-ascii/#findComment-1170369 Share on other sites More sharing options...
sunfighter Posted February 5, 2011 Share Posted February 5, 2011 Are you saving this as a php file???? not a html Quote Link to comment https://forums.phpfreaks.com/topic/226812-html_entity_decode-not-decoding-ascii/#findComment-1170373 Share on other sites More sharing options...
scarhand Posted February 5, 2011 Author Share Posted February 5, 2011 I figured it out. It was missing a ; after each ascii code. Quote Link to comment https://forums.phpfreaks.com/topic/226812-html_entity_decode-not-decoding-ascii/#findComment-1170406 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.