Hi My program is comparing values stored in 2 different array. My code is as follows
for ($xcntr = 0; $xcntr < scalar(@cgo_LineNo); $xcntr++) { $flag = "N"; for ($ycntr = 0; $ycntr < scalar(@con_LineNo) || $con_LineNo[$ycnt +r] > $cgo_LineNo[$xcntr]; $ycntr++) { if ($cgo_LineNo[$xcntr] == $con_LineNo[$ycntr]) { $flag = "Y"; } } }
[download]
but I want it to come out of for loop as soon as the value of $con_LineNo$ycntr is greater than $cgo_LineNo$xcntr