php: 遍历数组的几种方法

foreach

array_column

php版本必须 >= 5.5.0

array array_column ( array $input , mixed $column_key [, mixed $index_key ] )
  • $input 要遍历的多维数组
  • $column_key 想要获取的那一列的键名
  • $index_key

评论
:broken_heart: :confounded: :flushed: :frowning: :grinning: :heart: :kissing_heart: :mask: :pensive: :rage: :relaxed: :scream: :smile: :smirk: :sob: :stuck_out_tongue_closed_eyes: :stuck_out_tongue_winking_eye: :wink: