<bi*******@gmail.com> wrote in message
news:11**********************@g14g2000cwa.googlegr oups.com...
$out:
Array ( [course_id] => [html_title] => Change Profile [trail] => Home >
Change Profile:
[hooks] => Back to Home [day] => 12 [month] => 05 [year] => 1983
[birmonth] => )
$selected
Array ( [1] => [2] => [3] => [4] => [5] => SELECTED [6] => [7] => [8]
=> [9] => [10] => [11] => [12] => )
Right, got it.
When PHP looks at $selected[$out['month']], it evaluates $selected['05'] by
the looks of it, i.e. the 'month' value in $out is a string, not a number.
To fix this, try either
1 - set the value as a number in the first place:
$out['month'] = 5;
2 - cast the value to an integer
$selected[int($out['month']] = 'SELECTED';
Hope this helps
Matt