- htmlentities: documentation ( source)
- html_entity_decode: documentation ( source)
<?php
$string = 'Hotel Hastelská';
echo html_entity_decode($string,ENT_XML1, 'UTF-8');
echo '<br>';
echo htmlentities($string, ENT_COMPAT | ENT_XML1, 'UTF-8');