- strtr: documentation ( source)
- str_replace: documentation ( source)
- trim: documentation ( source)
- preg_replace: documentation ( source)
- strtolower: documentation ( source)
<?php
$string = strtr("This is á tèst!",
"ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖØÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõöøùúûýýþÿŔŕ",
"aaaaaaaceeeeiiiidnoooooouuuuybsaaaaaaaceeeeiiiidnoooooouuuyybyRr");
$string = trim($string);
$string = str_replace (" ", "-", $string);
$string = preg_replace('/[^a-zA-Z0-9-]/', '', $string);
$string = strtolower($string);
echo $string;