Jump to content

Trouble with htmlentities


c_shelswell

Recommended Posts

Look at the charset specified inside your head tages in your html/xhtml.

Mine is usually utf-8.

 

<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />

 

So if I'm using htmlentities - I specify the charset I'm using.

 

htmlentities(STRING, QUOTE STYLE, CHARSET)

 

In practice, it's:

 

$string = htmlentities($string,ENT_QUOTES,"utf-8");

 

Don't worry about the ENT_QUOTES part... that just means that you've chosen to change all single and double quotes into their respective html entities.

 

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.