Hello could you help me where exactly to place the delimiters in the code below?
function simplifica($txt){
$txt = strtolower($txt);
$txt = str_replace(array('á','à','â','ã','å','ä','ª','Á','À','Â','Ã','Ä'), 'a', $txt);
$txt = str_replace(array('é','è','ê','ë','É','È','Ê','Ë'), 'e', $txt);
$txt = str_replace(array('í','ì','î','ï','Í','Ì','Î','Ï'), 'i', $txt);
$txt = str_replace(array('ó','ò','ô','õ','ö','º','Ó','Ò','Ô','Õ','Ö'), 'o', $txt);
$txt = str_replace(array('ú','ù','û','ü','Ú','Ù','Û','Ü'), 'u', $txt);
$txt = str_replace(array('ñ','Ñ'), 'n', $txt);
$txt = str_replace(array('ç','Ç'), 'c', $txt);
/*
$txt = ereg_replace('[áàâãåäªÁÀÂÄÃ]', 'a', $txt);
$txt = ereg_replace('[íìîïÍÌÎÏ]', 'i', $txt);
$txt = ereg_replace('[éèêëÉÈÊË]', 'e', $txt);
$txt = ereg_replace('[óòôõöºÓÒÔÕÖ]', 'o', $txt);
$txt = ereg_replace('[úùûüÚÙÛÜ]', 'u', $txt);
$txt = ereg_replace('[ñÑ]', 'n', $txt);
$txt = ereg_replace('[çÇ]', 'c', $txt);
*/
$txt = preg_replace("\n|\t|\r", '', $txt);
$txt = preg_replace('[ ]+', ' ', $txt); // de 2 espaços p/ nada
$txt = preg_replace('[ ]', '-', $txt); // de 2 espaços p/ nada (denovo)
$txt = preg_replace('-+', '-', $txt); // de 2 espaços p/ nada (denovo)
return preg_replace('/([^a-z0-9-]*)/', '', $txt);