access each value of associative array
hello how can i access or echo each element of this associative array
Array ( [0] => Array ( [rule] => admin/user [title] => Users Management 开发者_开发知识库 [target] => _parent [0] => Array ( [0] => Array ( [rule] => admin/user/add [title] => Add New User ) ) ) [1] => Array ( [rule] => admin/category [title] => Category Mangement [target] => _parent [0] => Array ( [0] => Array ( [rule] => admin/category/add [title] => Add New Category ) ) ) )
I want to know which loop will support this and how
I suppose that using array_walk_recursive()
, with a callback function that would do an echo, would be quite a good solution.
精彩评论