Cioè? così?
Codice PHP:
$arr_testi = array("A" => "provaA""B" => "provaB");

function 
txt_display($txt_pulsante)
{
if (
array_key_exists($txt_pulsante$GLOBALS[$arr_testi])):
    
$GLOBALS[$txt_nome] = $arr_testi[$txt_pulsante];
endif;
return 
$txt_nome;
}
echo  
txt_display('A'); 
mi da: Warning: array_key_exists(): The second argument should be either an array or an object