function listEventTeams($eventid){ $allteams = registration::getTeamIds($eventid); $cnt=count($allteams); $ev = new event($eventid); $min = $ev->getMinimum(); $max = $ev->getMaximum(); $res=array(); $i=0; while($i<$cnt) { $teamid = $allteams[$i]['rg_teamid']; $obj = new registration($allteams[$i]['rg_teamid']); $str = $obj -> eventConfirm($min,$max); if($str=="Confirm") { $pc1 = array($obj->getRgCaptainConfirm(), $obj->getRgConfirm1(), $obj->getRgConfirm2(), $obj->getRgConfirm3(), $obj->getRgConfirm4(), $obj->getRgConfirm5(), $obj->getRgConfirm6()); $pc = array($obj->getRgCaptainId(), $obj->getRgPart1(), $obj->getRgPart2(), $obj->getRgPart3(), $obj->getRgPart4(), $obj->getRgPart5(), $obj->getRgPart6()); $ct=count($pc); $j=0; $csv=""; while($j<$ct) { if($pc[$j]!='' && $pc1[$j]!='N') $csv.="$pc[$j],"; $j++; } $csv=trim($csv,","); $res[$teamid]=$csv; } $i++; } return $res; }