phpFirstJoy 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! Quote Link to comment https://forums.phpfreaks.com/topic/74881-solved-htmlentitles/ Share on other sites More sharing options...
GingerRobot 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. Quote Link to comment https://forums.phpfreaks.com/topic/74881-solved-htmlentitles/#findComment-378566 Share on other sites More sharing options...
phpFirstJoy Posted October 27, 2007 Author Share Posted October 27, 2007 Ooooooh so that's why! Thanks! Quote Link to comment https://forums.phpfreaks.com/topic/74881-solved-htmlentitles/#findComment-379144 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.