我想添加2个变量,这两个变量恰好是复选框到一个名为SPIP的后端的一部分的数组。将2个变量添加到单个数组的位置
当前阵列设置为单个复选框看起来像这样:
$UpcomingEvent = 'is_upcoming_event';
$ThermometerEvent = 'is_thermometer_event';
$GLOBALS['champs_extra'] = array (
'articles' => array (
$nis => "checkbox|propre|New Inspirational Stories?",
$UpcomingEvent => "checkbox|propre|Is a Upcoming Event? (<em>present into Home page?</em>)",
$ThermometerEvent => "checkbox|propre|Add thermometer to event?",
'redirect_to_hyperlink' => "checkbox|propre|Redirect article to Hyperlink?"
)
);
$GLOBALS['champs_extra_proposes'] = Array (
'articles' => Array (
// tous : par defaut aucun champs extra sur les articles
'tous' => 'redirect_to_hyperlink',
// seul le champs extra "new_inspirational_stories" est propos� dans le secteur 42)
/**
* UpComming Events
*/
'44' => $UpcomingEvent,
'45' => $UpcomingEvent,
)
);
我想将ThermometerEvent变量添加到阵列位置44和45,以及,但无法弄清楚如何做到这一点不覆盖44或45位置。
我试图把它在另一个数组像这样,但它没有工作:
'45' => array($UpcomingEvent, $ThermometerEvent),
任何帮助表示赞赏!
啊是有道理的。我得到了“阵列”,我必须深入挖掘。谢谢 – Sackling 2011-05-03 16:13:25