Reputation: 202
I am iterating options and want to show check
and times
icon with every option so I tried this code:
@foreach($findadminproducts as $a)
<option value="{{ $a->id }}" >{{ $a->name }}
@if ( $a->price == $product->price)
<i class="fa fa-check" aria-hidden="true">Matched</i>
@else
<i class="fal fa-times">Not Match</i>
@endif
</option>
@endforeach
In option I want if price is same show check
icon else times but it does not show icon none of my icon is working if condition success then it shows match without icon on else condition it only shows "Not Match" without icon I want match or not match with icon
Upvotes: 0
Views: 250
Reputation: 301
invalid html option tag doesnot support nested tags so it is better for you u should use symbol as a text like ✓Matched
Upvotes: 1