htmlentities

 string htmlentities ( string $string [, int $flags = ENT_COMPAT | ENT_HTML401 [, string $charset [, bool $double_encode = true ]]] ) 

説明

This function is identical to htmlspecialchars() in all ways, except with htmlentities(), all characters which have HTML character entity equivalents are translated into these entities. If you're wanting to decode instead (the reverse) you can use html_entity_decode().

戻り値

Returns the encoded string.