I'm using friendly urls and to generate the link, I'm using it this way:
$string = $jm->NomeCategoria; // retorna roupa de verão
$hifen = preg_replace('/[ -]+/' , '-' , $string); // incluo o hífen
$acentos = preg_replace( '/['^~\'"]/', null, iconv( 'UTF-8', 'ASCII//TRANSLIT', $hifen)); // retiro as acentuações
With these commands it returns: summer clothing . I just need to retrieve the string correct summer clothing on another page, as I need to do the check in the database. I was able to remove the hyphen and put the spaces, how can I "return" accentuations of a string ?