访问关联数组的每个值
你好,我如何访问或回显这个关联数组的每个元素
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 ) ) ) )
我想知道哪个循环将支持这个以及如何
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
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我想使用
array_walk_recursive()
,一个可以进行回显的回调函数将是一个很好的解决方案。I suppose that using
array_walk_recursive()
, with a callback function that would do an echo, would be quite a good solution.