how I can get value from input select in ZF3?
$education = $form->get('education');
$education->setValueOptions([
'1' =>'option 1',
'2' => 'option 2',
]);
returns integer value 1,2, not 'option 1' or 'option 2'
Even if I remove index and leave code like below
$education->setValueOptions([
'option 1',
'option 2',
]);
it doesn't work and returns the same as above.
But if I modify code like this
$education->setValueOptions([
'option 1' => 'anything'
'option 2' => 'anything'
]);
it returns correct values as 'option 1' or 'option 2'.
Is is correct, or I'm dooing something wrong?