Semplice esempio

Codice PHP:
$test trasforma('Mario Balotelli (1990)');

echo 
$test;


function 
trasforma($stringa){
    
return 
strtolower(preg_filter('/[^a-zA-Z0-9\\-]/','',str_replace(' ','-',$stringa)));