在条件满足异常的任何情况下,我都需要打破其中包含条件的循环
像这样:
for($l=0; $l<$subject_count; $l++){
for($a=0; $a<$term_relatives_id_array_count; $a++){
if($subject_array[$l]['id'] == $term_relatives_id_array[$a]['subject_id']){
$subject_echo = true;
break;
}
echo 'a';
}
if(!$subject_echo){
echo '<li class="selectable_item" id="'.$subject_array[$l['id'].'">'.$subject_array[$l]['name_fa'];
echo '</li>';
}
}
我曾经echo 'a';
看看是否break;
有效,但它不会破坏内部循环我该怎么办?