Tema: URL amigable
Ver Mensaje Individual
  #17 (permalink)  
Antiguo 07/04/2006, 13:52
Avatar de living
living
 
Fecha de Ingreso: mayo-2004
Mensajes: 1.266
Antigüedad: 19 años, 11 meses
Puntos: 2
Yo uso esta función y cumple perfectamente con su cometido:
Código PHP:
function getRewriteString($sString) {
     
$string strtolower(htmlentities($sString));
     
$string preg_replace("/&(.)(uml);/""$1e"$string);
     
$string preg_replace("/&(.)(acute|cedil|circ|ring|tilde|uml);/""$1"$string);
     
$string preg_replace("/([^a-z0-9]+)/""-"html_entity_decode($string));
     
$string trim($string"-");
     return 
$string;
  } 
__________________
¿Te apasiona el mundo del guión? El portal del guión