I am using cakephp 3 and using Form->input() and need to pass an array of options.
My array looks like this :
$options=['option1', 'option2', 'option3'];
I need the values of these options same as labels. Problem is, cakephp is using array index as value. So if someone selects option1, values is going 0. I need the value to be option1.
Edit :
For now, I've changed the array to look like this :
$options=['option1'=>'option1', 'option2'=>'option2', 'option3'=>'option3'];
It works, but still out of curiosity, is there any other way?