I\'m developing a php app that uses a database class to query mySQL.
the class is here: http://net.tutsplus.com/tutorials/php/real-world-oop-with-php-and-mysql/
You can use array_walk_recursive:
array_walk_recursive
array_walk_recursive($array, function ($item, $key) { echo "$key holds $item\n"; });