I'm creating a select box using zend form element. Now I've a list of values to be displayed in selectbox which may have same values but different captions. Zend forms wont display two options with same value. My code is as follows:
$this->addMultiOption('','-- Select ****** --');
foreach($options as $option) {
$this->addMultiOption($option->value,$option->caption);
}
Here the values for options can be same like 1,2,3,4,1,2,6,7,8,2,3,2,1... And caption for options are different like aaa,bbb,ccc,ddd,eee,fff
aaa can have value 1, bbb also can have value 1 in this case it would show bbb only and so on.
Is there a way to make this work?
Thanks in advance.