There are three foreach loop and on the last foreach loop there is an if condition,
foreach ($candidate_data as $cd) {
$edu_data=DB::table('applicant_edu_info')
->where('applicant_id',$cd->ap_id)
->get();
foreach($edu_data as $ed){
foreach($neededDegree as $nd){
if($neededDegree->edu_degree_id==$ed->edu_degree_id){
$education_data[$cd->ap_id]=$neededDegree->name;
}
}
}
}
what I need is , If the condition is true then I want to break two loops and continue running from the first foreach loop. Please help.