Currently I am working on building a select box for phone country extensions. My select box is like this.
<option value="Albania">355</option>
...
<option value="Canada">1</option>
...
I provide an array as choices for the select field in the Symfony form. array is like this.
array(
'Albania' => 355,
'Afganisthan' => 93,
...
'Canada' => 1,
...
...
'United States Of America' => 1
);
But, when I render the form, the list rendered is bit strange. I cannot see Canada option. Instead, it is replaced by United States Of America.
I guess it is because of the option text is the same (1 and 1).
This was working before until I upgrade my Symfony version from 2.4 to 2.7. I went through the Symfony documentation but not enough lucky to find any related thing.
Why this happens?