Multidimensional array not printing right

SpaceshipSpaceship
Watch

Crusader

Established Member
Impact
6
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.
 
0
•••
The views expressed on this page by users and staff are their own, not those of NamePros.
GoDaddyGoDaddy
hmmm

all i can tell this is doing is adding an array to the variable report which is just a variable.if theres more please show but if you want $report to print to screen try this at the end of the script
PHP:
reset($report);//this basicly rewinds an array position to the beginning
print_r($report);//this prints an arry
(any mistakes in my syntax let me know)

Thats all i can say unless there is more

Peace
.:klavixs:.
 
1
•••
Dynadot — .com TransferDynadot — .com Transfer
CatchedCatched

We're social

Escrow.com
Spaceship
Rexus Domain
CryptoExchange.com
Domain Recover
CatchDoms
DomDB
NameFit
  • The sidebar remains visible by scrolling at a speed relative to the page’s height.
Back