Jump to content

3d php array


qmqmqm

Recommended Posts

Hi

 

I know that for a 2d array when you iterate through it, you can go:

 

foreach( $employeeAges as $key => $value){

echo "Name: $key, Age: $value <br />";

}

 

but I have a 3 d array. Can I use:

foreach( $employeeAges as $key => $value1 => value2){

echo "Name: $key, Age: $value1, $value2 <br />";

}

 

How should I iterate through the array then?

 

Thanks,

 

Tom

Link to comment
https://forums.phpfreaks.com/topic/147732-3d-php-array/
Share on other sites

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.