php foreach with multidimensional array

后端 未结 12 1617
一向
一向 2020-11-27 05:10

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/

12条回答
  •  無奈伤痛
    2020-11-27 05:28

    You can use array_walk_recursive:

    array_walk_recursive($array, function ($item, $key) {
        echo "$key holds $item\n";
    });
    

提交回复
热议问题