Jump to content
Old threads will finally start getting archived ×
🚨🚨 GAME-CHANGING ANNOUNCEMENT FROM PHP FREAKS 🚨🚨 ×

[SOLVED] htmlentitles()


Merlin 🤖

Recommended Posts

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 &#039;quote&#039; 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

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.