Undefined Index currency
Closed this issue · 1 comments
minedun6 commented
No idea what seems to be wrong ?
@foreach($countries as $country) <option value="{{ $country['country-code'] }}">{{ $country['name'] }}</option> @endforeach
this works fine but when i do the same thing with
`@foreach($countries as $country)
this doesn't work and it prints out "Undefined Index: currency/currency_code"
webpatser commented
Since a few countries have no currency (like Antarctica) this field is not always in the array.
Just do a isset($country['currency_code']) first.