seco Posted February 14, 2008 Share Posted February 14, 2008 Hi i have a code get it from the web to draw a menu and it uses htmlentities function and convert the character to html chars instead !! and i remove it and my chars appeas now well so what is the importance of these functions i read php.net but don't know any applicable thing for them does any one use them for something useful before? i remove it and nothing happen. thanks in advance. Link to comment https://forums.phpfreaks.com/topic/91082-htmlentities-and-htmlentitiesdecode/ Share on other sites More sharing options...
PHP Monkeh Posted February 14, 2008 Share Posted February 14, 2008 If you're applying htmlentities then using the decode function they cancel each other out. Using htmlentities() on a & will output & If you use html_entity_decode() on the & it'll then return & Link to comment https://forums.phpfreaks.com/topic/91082-htmlentities-and-htmlentitiesdecode/#findComment-466917 Share on other sites More sharing options...
seco Posted February 15, 2008 Author Share Posted February 15, 2008 ok i will convert and back again what i gain now? i mean what is the usefulness of this functions? Link to comment https://forums.phpfreaks.com/topic/91082-htmlentities-and-htmlentitiesdecode/#findComment-467636 Share on other sites More sharing options...
PHP Monkeh Posted February 15, 2008 Share Posted February 15, 2008 You may not want to store the actual symbol in a database, some foreign lettering for example are sometimes better off storing their htmlentities equivalent rather than the symbol itself. Then you can use the decode method to retrieve the symbol. Link to comment https://forums.phpfreaks.com/topic/91082-htmlentities-and-htmlentitiesdecode/#findComment-467810 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.