dongu başlar başlamaz if koy:
if($onuc->hizmetno == $acikolanhizmetno) {continue;}

Cevap bu değilse soruyu anlatamadınız demektir.