これを機能させることはできません。
以下の配列を2番目の関数で使用できるようにしたいのですが、常に空になります
主なコードは次のとおりです。
function GenerateSitemap($params = array()) {          
$array = extract(shortcode_atts(array(                         
'title' => 'Site map',                         
'id'    => 'sitemap',                         
'depth' => 2                         
), $params));                                  
global $array; 
}  
function secondfunction()
{
global $array; 
print $title;
// this function throws an error and can't access the $title key from the first function
}
GenerateSitemap()
secondfunction()
2 番目の関数内でtitle、idまたはdepth KEYSを使用したいと思います。それらは空になり、エラーをスローします