仅当满足某些条件时,我才需要在for-loop
中运行一组代码:
@for($i = 0; $i <= $date_diffrence; $i++)
@if(condition)
$temp = $i;
@for($multDayCount=0; $multDayCount<count($dayDifferenceArr); $multDayCount++)
$i = $dayDifferenceArr[$multDayCount];
@endif
<code_section>
@if(condition)
@endfor
$i = $temp;
@endif
@endfor
无论if-for条件如何,我都希望 运行。我该如何循环?任何帮助将不胜感激。