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

WBOY
Freigeben: 2016-06-06 20:43:52
Original
780 Leute haben es durchsucht

<code>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 ) 
) 
</code>
Nach dem Login kopieren
Nach dem Login kopieren

回复内容:

<code>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 ) 
) 
</code>
Nach dem Login kopieren
Nach dem Login kopieren

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

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

Verwandte Etiketten:
php
Quelle:php.cn
Erklärung dieser Website
Der Inhalt dieses Artikels wird freiwillig von Internetnutzern beigesteuert und das Urheberrecht liegt beim ursprünglichen Autor. Diese Website übernimmt keine entsprechende rechtliche Verantwortung. Wenn Sie Inhalte finden, bei denen der Verdacht eines Plagiats oder einer Rechtsverletzung besteht, wenden Sie sich bitte an admin@php.cn
Beliebte Tutorials
Mehr>
Neueste Downloads
Mehr>
Web-Effekte
Quellcode der Website
Website-Materialien
Frontend-Vorlage
Über uns Haftungsausschluss Sitemap
Chinesische PHP-Website:Online-PHP-Schulung für das Gemeinwohl,Helfen Sie PHP-Lernenden, sich schnell weiterzuentwickeln!