Looping through the first row of a 2 dimensional array

Thread Solved

Join Date: Apr 2008
Posts: 69
Reputation: K?! is an unknown quantity at this point 
Solved Threads: 0
K?! K?! is offline Offline
Junior Poster in Training

Looping through the first row of a 2 dimensional array

 
0
  #1
Sep 4th, 2008
What's wrong about this code?
($matches is a 2 dimensional array)

for($i = 0; $i < count($matches); $i++)
{
echo $matches[$i][0]->getName_team_home()."<br />";
}

It's not the actual code, it's just an example, originally it has to put the names of a team playing home in a table.

It only shows the first team, it doesn't seem like it goes any further than $i=0...

greets K?!
Heaven ain't got no ghetto. It's got pearly gates and streets of gold.
Reply With Quote Quick reply to this message  
Join Date: Apr 2008
Posts: 69
Reputation: K?! is an unknown quantity at this point 
Solved Threads: 0
K?! K?! is offline Offline
Junior Poster in Training

Re: Looping through the first row of a 2 dimensional array

 
0
  #2
Sep 4th, 2008
Problem solved, the code itself worked, the problem was that i made a mistake putting the data from the database into this 2 dimensional array, everything was placed in $matches[0]...

Greets, K?!
Heaven ain't got no ghetto. It's got pearly gates and streets of gold.
Reply With Quote Quick reply to this message  
Reply

This thread has been marked solved.
Perhaps start a new thread instead?
Message:



Similar Threads
Other Threads in the PHP Forum
Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC