Com esta função (caracterEsp) é possível substituir os caracteres especiais em maiúsculo de uma string para minúsculo.
/* FUNÇÃO QUE SUBSTITUI CARCATERES ESPECIAIS MAIUSCULOS PARA MINUSCULOS */ function caracterEsp($string) { for($i = 0; $i < strlen($string); $i++) { $controle='sim'; if($string[$i]=='Á') { $stringRetorno .= "á"; $controle='nao'; } if($string[$i]=='À') { $stringRetorno .= "à"; $controle='nao'; } if($string[$i]=='Â') { $stringRetorno .= "â"; $controle='nao'; } if($string[$i]=='Ã') { $stringRetorno .= "ã"; $controle='nao'; } if($string[$i]=='É') { $stringRetorno .= "é"; $controle='nao'; } if($string[$i]=='È') { $stringRetorno .= "è"; $controle='nao'; } if($string[$i]=='Ê') { $stringRetorno .= "ê"; $controle='nao'; } if($string[$i]=='Í') { $stringRetorno .= "í"; $controle='nao'; } if($string[$i]=='Ì') { $stringRetorno .= "ì"; $controle='nao'; } if($string[$i]=='Î') { $stringRetorno .= "î"; $controle='nao'; } if($string[$i]=='Ó') { $stringRetorno .= "ó"; $controle='nao'; } if($string[$i]=='Ò') { $stringRetorno .= "ò"; $controle='nao'; } if($string[$i]=='Ô') { $stringRetorno .= "ô"; $controle='nao'; } if($string[$i]=='Õ') { $stringRetorno .= "õ"; $controle='nao'; } if($string[$i]=='Ú') { $stringRetorno .= "ú"; $controle='nao'; } if($string[$i]=='Ù') { $stringRetorno .= "ù"; $controle='nao'; } if($string[$i]=='Û') { $stringRetorno .= "û"; $controle='nao'; } if($string[$i]=='Ç') { $stringRetorno .= "ç"; $controle='nao'; } if($controle=='sim'){ $stringRetorno .= $string[$i]; } } return $stringRetorno; } function limpa_array($arr){ // Função que retira itens em branco de um array for($i=0;$i<=count($arr);$i++){ if($arr[$i]){ $arx[] = $arr[$i]; } } return $arx; } $texto = 'AGORA EU TE CONHEÇO MELHOR. VOCÊ É LEGAL.'; $array1 = explode('.',trim($texto)); $array1 = limpa_array($array1); $textox = ''; for($x1=0;$x1'.$textox.'
‘;
?>