search

Home  >  Q&A  >  body text

php怎么取出每一个子数组里得值

Array ( 
[0] => Array ( [stat_day] => 2014-07-24 [stat_type] => 1 [total] => 445 ) [1] => Array ( [stat_day] => 2014-07-21 [stat_type] => 2 [total] => 547 ) [2] => Array ( [stat_day] => 2014-07-23 [stat_type] => 2 [total] => 498 ) [3] => Array ( [stat_day] => 2014-07-27 [stat_type] => 2 [total] => 679 ) [4] => Array ( [stat_day] => 2014-07-22 [stat_type] => 3 [total] => 910 ) [5] => Array ( [stat_day] => 2014-07-25 [stat_type] => 3 [total] => 78 ) [6] => Array ( [stat_day] => 2014-07-26 [stat_type] => 3 [total] => 547 ) [7] => Array ( [stat_day] => 2014-07-28 [stat_type] => 3 [total] => 417 ) [8] => Array ( [stat_day] => 2014-07-29 [stat_type] => 3 [total] => 747 ) 
) 
阿神阿神2901 days ago500

reply all(2)I'll reply

  • 巴扎黑

    巴扎黑2017-04-10 14:57:09

    一种思路就是用foreach遍历该数组,然后输出各个子数组里面的所有内容。

    reply
    0
  • 阿神

    阿神2017-04-10 14:57:09

    http://php.net/manual/zh/function.array-column.php

    reply
    0
  • Cancelreply