Symfony:有一个“0” (零)在 sfWidgetFormChoice 中
我想显示选择哪些选项是字符“-”和整数范围。
我有这个:
$years = range(14,130);
new sfWidgetFormChoice(array('choices' =>
array_merge(array('' => '-',array_combine($years,$years)));
问题:在“-”和整数范围之间有一个“0”(粗体和斜体)。
有什么帮助吗?
问候
哈维
i want to show a select which options are the character '-' and a range of integers.
I have this:
$years = range(14,130);
new sfWidgetFormChoice(array('choices' =>
array_merge(array('' => '-',array_combine($years,$years)));
The problem: between the '-' and the range of integers there is a "0" (bold and italic).
Any help?
Regards
Javi
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
奇怪的是:
给出:
哪个是正确的(显然这个答案的值已经改变)。您的结果是因为
$years
数组的组合作为整个数组附加到默认值,而不是合并它。Oddly:
gives:
Which is correct (obviously the values are changed for this answer). Your result is because the combining of the
$years
array is appended to the default value as a whole array, rather than merging it.