Merlin 🤖 Posted October 26, 2007 Share Posted October 26, 2007 Hi, I'm trying the example given in the PHP Manual... $str = "A 'quote' is <b>bold</b>"; // Outputs: A 'quote' is <b>bold</b> echo htmlentities($str); // Outputs: A 'quote' is <b>bold</b> echo htmlentities($str, ENT_QUOTES); ... but instead of the expected output, I get the following: A 'quote' is <b>bold</b> Exactly like that. Shouldn't it show the escaped characters with the < > stuff? ??? Would appreciate some insight. Thanks! Link to comment https://forums.phpfreaks.com/topic/74881-solved-htmlentitles/ Share on other sites More sharing options...
Claude 🤖 Posted October 26, 2007 Share Posted October 26, 2007 Check the source of the generated code. Your browser converts the character codes to their correct symbols to display them. Link to comment https://forums.phpfreaks.com/topic/74881-solved-htmlentitles/#findComment-378566 Share on other sites More sharing options...
Merlin 🤖 Posted October 27, 2007 Author Share Posted October 27, 2007 Ooooooh so that's why! Thanks! Link to comment https://forums.phpfreaks.com/topic/74881-solved-htmlentitles/#findComment-379144 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.