Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PHP

option selected in laravel blade

<option value="">--Select--</option>
@foreach($array as $key => $arr)
  <option value="{{++$key}}" {{ $selectedValue == $key ? 'selected' : '' }}> {{ $arr }}</option>
@endforeach
 
PREVIOUS NEXT
Tagged: #option #selected #laravel #blade
ADD COMMENT
Topic
Name
6+5 =