string htmlentities ([string $string ], [int $quote_style] , [string $charset])
quote_style
ENT_NOQUOTES Will leave both double and single quotes unconverted.
ENT_QUOTES Will convert both double and single quotes.
ENT_COMPAT Will convert double-quotes and leave single-quotes alone.
EX:
$strr = "A 'quote_value' is bold";
echo htmlentities($strr)."
";
echo htmlentities($strr, ENT_QUOTES);
?>
O/P:
A 'quote_value' is bold
A 'quote_value' is bold