codice:
$arr_testi = array("A" => "provaA", "B" => "provaB");
function txt_display($txt_pulsante,$arr_testi){
	if (array_key_exists($txt_pulsante, $arr_testi)):
		$txt_nome = $arr_testi[$txt_pulsante];
	endif;
	return $txt_nome;
}
echo  txt_display('A',$arr_testi);


codice:
$arr_testi = array("A" => "provaA", "B" => "provaB");
function txt_display($txt_pulsante){
	global $arr_testi;
	if (array_key_exists($txt_pulsante, $arr_testi)):
		$txt_nome = $arr_testi[$txt_pulsante];
	endif;
	return $txt_nome;
}
echo  txt_display('A');