I'm having trouble in showing the value of my selected value in select dropdown.
I tried else statement, but it an error occured.
$stat = $data['ba_Status'];
<option value="January"<?php if (($stat == '0') || ($stat == 'R') || ($stat == 'D') || ($stat == 'S1') || ($stat == 'F1')) echo ' selected="selected"'; ?>>YES</option>
<option value="December"<?php if ($stat == 'L') echo ' selected="selected"'; ?>>NO</option>
Check the output of var_dump($stat) and check for that exact output, especially that =='0', does it output what you think?
nb wouldn't it be easier just to check if $stat is L?