I think you can use the hexadecimal representation of each letter:
<?php function IsAlpha($sString) { $reg = "#[a-zA-Z\xE1\xE9\xED\xF3\xFA\xC1\xC9\xCD\xD3\xDA\xF1\xD1]+#i"; $count = preg_match_all($reg, $sString, $matches, PREG_OFFSET_CAPTURE); return $matches; } echo '<pre>'; print_r(IsAlpha("abcdefgh ñ á é í ño 123 asd asáéío nmas asllsdasd óúfl ÑABDJÓ ÚñÍÉ")); echo '</pre>';
I don’t know if all the letters are there, but you can add another link.
source share