I have below code, $tables contains all tables available in the system and $order_info contains all current orders, that contains table_id as well,
Now I want to show only those tables which table_id is not in $order_info array.
@foreach($tables as $t)
@foreach($order_info as $o)
@if($o['table_id'] != $t->table_id)
<option value="{{$t->table_id}}">{{$t->table_number}}</option>
@endif
@endforeach
@endforeach
obviously above code is showing me duplicate table numbers because I am looping it for two arrays, How can I show only those tables which are not in $order_info
Thank you,