我访问数组时不显示数组结果,如何访问此数组中的特定字段值

我访问数组时不显示数组结果,如何访问此数组中的特定字段值

问题描述:

Array ( [0] => 
    Array ( 
      [Bounces] => 1 
      [Complaints] => 0 
      [DeliveryAttempts] => 405 
      [Rejects] => 0 
      [Timestamp] => 2014-11-07T11:47:00Z ) 

        [1] => etc etc
        // Multiple array values are here
     );
  Array([0] => 
 Array(
 [Bounces] => 1  
 [投诉] => 0 
 [DeliveryAttempts] => 405 
 [拒绝] => 0 
 [时间戳] => 2014-11-07T11:47:00Z)
 
 [  1] =>等等
 //多个数组值在这里
); 
  code>  pre> 
  div>

Its a simple multidimensional array.

Just do this..

 foreach($yourArray as $val){
     foreach($val as $v){
            echo $v['Bounces']."<br>";
            echo $v['Complaints']."<br>"; // etc etc
     }

 }

Or if you want to just get values directly without looping

 $yourArray[0]['Complaints']; // Complaints attribute of 1st array entry
 $yourArray[1]['Bounces']; // Bounce attribute of 2nd array entry
 $yourArray[4]['Rejects']; //Rejects attribute of 5th array entry