@if(count($combinations[0]) > 0) @foreach ($combinations as $key => $combination) @php $str = ''; foreach ($combination as $key => $item){ if($key > 0 ){ $str .= '-'.str_replace(' ', '', $item); } else{ $str .= str_replace(' ', '', $item); } } @endphp @if(strlen($str) > 0) @endif @endforeach
@endif