Ik denk zo:
global$m;
global$lang;
if($lang=="nl"||$lang==""){$l="";}else{$l="&lang=$lang";}
$aex=explode("|",$a);
if(!isset($aex[1])){$aex[1]=$aex[0];}
$b=str_replace(" ","_",$aex[0]);
return"<a href=\"index.php?page=".$b.$m.$l."\">$aex[1]</a>";