muazzamazaz
1 year ago

selected option not working

Posted 1 year ago by muazzamazaz

I am getting selected option from db as

@foreach($admins as $index => $admin)
                  <tr>
                   
                      <td>
                      <Select name="region" class="form-control" id="region" placeholder="Region">
                                  <Option value="AS" @if ($admin->region == 'AS')  selected = "selected" @endif >Asia</option>
                                  <option value="ME" @if ($admin->region == 'ME')  selected = "selected" @endif >Middle East</option>
                                  <option value="EU" @if ($admin->region == 'EU')  selected = "selected" @endif >Europe</option>
                                  </select>
                                  </td>
@endforeach

but not showing selected option

Please sign in or create an account to participate in this conversation.