Jump to content

accessing nested arrays


rossmurphy

Recommended Posts

What about this...

 

I have these arrays

 

$games['slots']

$games['poker']

$games['bingo']

 

and inside each is another array.

 

When i go like this..

 

foreach($games['slots'] as $gamesource) {
foreach($gamesource as $games) {
	foreach($games as $game) {

		echo $game['gameName'];

	}
}
}

 

to access the slots array, then i do the same as above again for the poker array...i get and error...invalid foreach??

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.