【发布时间】:2010-07-09 13:25:32
【问题描述】:
我有一个表单中的选择小部件:
$years = range(14,130);
$this->widgetSchema['age'] = new sfWidgetFormSchema();
foreach (array('from', 'to') as $value)
{
$this->widgetSchema['age'][$value] = new sfWidgetFormChoice(array(
'label' => $value,
'choices' => array_merge(array('' => '-'),array_combine($years,$years))));
}
如果我选择例如 14 并且在接收表单的操作中会这样写:
var_dump($valores_widgets['age']['from']);
显示为 0。但我预计为 14。
有什么想法吗?
问候
贾维
【问题讨论】: