Code:
if($owner[$i]!=NULL){
//print 'yes';
if($report!=NULL){
if($report[0]['sector']!=$location[$i]){
print $report[0]['sector'];
$report=NULL;
} else {
$report[]=array("sector"=>$location[$i],"owner"=>$owner[$i],"ship"=>$ship[$i],"mothership"=>$mothership[$i],"name"=>$name[$i]);
}
} else {
$report=array();
$report[]=array("sector"=>$location[$i],"owner"=>$owner[$i],"ship"=>$ship[$i],"mothership"=>$mothership[$i],"name"=>$name[$i]);
}
}
I don't know why but when there are 2 arrays or more it will only print the results for the second array. Can anyone see anything wrong with my code?
Thanks.















