Created
August 24, 2020 20:00
-
-
Save IsaacAndres/a0f6af7f2ec2d12a4229fbac809b6cbe to your computer and use it in GitHub Desktop.
Convierte las tildes de un texto a sus entidades HTML.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
function tildesHtml($cadena) { | |
return str_replace(array("á","é","í","ó","ú","ñ","Á","É","Í","Ó","Ú","Ñ"), array("á","é","í","ó","ú","ñ","Á","É","Í","Ó","Ú","Ñ"), $cadena); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment