3
這裏的條件是我的代碼..Laravel刀片使用,如果裏面的foreach
@foreach (Session::get('show_my_data') as $key1 => $value1)
<div class="sb_li">
<input id="sb_system_input_{{ $value1->Myid }}" class="fr_cap" type="text" disabled name="fr_cap[{{ $value1->Myid }}]" value="{{ $value1->FRCapacity }}" maxlength="127"/>
</div>
@foreach ($m002_siteinfo as $key => $value)
@if({{!$value1->name}})
<div class="sb_li">
<input id="sb_system_input_{{ $value->Myid }}" class="fr_cap" type="text" disabled name="fr_cap[{{ $value->Myid }}]" value="" maxlength="127"/>
</div>
@endif
@endforeach
@endforeach
我想顯示的Second foreach
值是不是有使用中間if condition
first foreach
,但IAM在Laravel越來越syntax error
,刀片神廟..任何方法來解決這個問題?
語法是固定的,但沒有得到預期的輸出:( – Friend
怎麼了?你在div @if沒有顯示?也許你可以嘗試其他條件,如$ value1-> name!==「」 – Needpoule