¿Así mejor?
Código PHP:
function lista() {
return array (
'Catro_vellos_mariñeiros_con_David_Civera'=>'nlIVrm3frrE',
'Oh_sole_mio'=>'0ZTiWAtB42c',
'Quedate'=>'DXQnHbg8kS4',
'Violetas_imperiales'=>'ZIZwwGoZ1FQ',
);
}
$videos=lista();
foreach ($videos as $clave => $valor) {
if (isset($_GET["v"])) {
if (str_replace("ñ","n",strtolower($clave))==$_GET["v"]) {
$title=str_replace("_"," ",$clave);
$url=$valor;
}
} else {
$title="Autobiografía";
$url="GJ0bMSr5-P0";
break;
}
$redes_sociales="http://".$_SERVER['HTTP_HOST'].$_SERVER['REQUEST_URI'];
}
function enlace($enlace) {
$videos=lista();
foreach ($videos as $clave=>$valor) {
if ($clave==$enlace) {
print "<a href='".str_replace("ñ","n",strtolower($clave)).".html'>".str_replace("_"," ",$clave)."</a>";
}
}
}