Diana Castillo wrote:
Anyone know of any function to replace letters with accents with just the
regular letter, for instance replace á with a,
ç with c, ñ with n ?
found this on the strtr() manual page (http://php.net/strtr):
<?php
function removeaccents($string){
return strtr(
strtr( $string,
'ŠŽšžŸÀÁÂÃÄÅÇÈÉÊËÌÍÎÏÑÒÓÔÕÖØÙÚÛÜÝàáâãäåçèéêëìíîïñòóôõöøùúûüýÿ',
'SZszYAAAAAACEEEEIIIINOOOOOOUUUUYaaaaaaceeeeiiiinoooooouuuuyy' ),
array(
'Þ' => 'TH', 'þ' => 'th', 'Ð' => 'DH', 'ð' => 'dh',
'ß' => 'ss', 'Œ' => 'OE', 'œ' => 'oe', 'Æ' => 'AE',
'æ' => 'ae', 'µ' => 'u' )
);
}
?>
--rick
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php