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
Oddly:
gives:
Which is correct (obviously the values are changed for this answer). Your result is because the combining of the
$yearsarray is appended to the default value as a whole array, rather than merging it.