Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save pandauxstudio/31532b83e303a1d163671c838eca8a4f to your computer and use it in GitHub Desktop.
Save pandauxstudio/31532b83e303a1d163671c838eca8a4f to your computer and use it in GitHub Desktop.
/**
* convertCharactersToHtml
* =======================
* Converts HTML characters to HTML elements, such as replacing greater-than sign ">" with ">".
* @param string mixedString String with special characters.
* @return string HTML elements.
*/
function convertCharactersToHtml($mixedString) {
return htmlspecialchars($mixedString);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment