我需要循环这个值
$blocks = array();
$blocks['list_modules']
有了这个:
$form['advanced']['custom_acc'] = array(
'#type' => 'select',
'#title' => t('module title'),
'#options' => array(
0 => t('No control'),
1 => t('Controlled'),
),
);
所以它应该变成这样
while (list(, $value) = each($blocks)) {
echo "
$form['advanced']['custom_->blocks array value'] = array(
'#type' => 'select',
'#title' => t('->blocks array value'),
'#options' => array(
0 => t('No control'),
1 => t('Controlled'),
),
);
";
}
但这当然行不通,有什么想法吗?我想我必须使用 foreach,我希望你能看到我想要实现的目标,
提前致谢!