1
//Decoded Json data
object(stdClass)[250]
  public '2013-02-05' =>
    object(stdClass)[114]
      public 'bounce_count' => int 1
      public 'avg_time_on_site' => int 237
  public '2013-02-06' =>
    object(stdClass)[115]
      public 'bounce_count' => int 6
      public 'avg_time_on_site' => int 983
$json_data=json_decode($result);
//$result has the json string 

如何检索特定日期的bounce_count、avg_time_on_site 以及该日期将在php 中更改的日期。

4

1 回答 1

2
$json_data=json_decode($result, true);

foreach($json_data as $date=>$val){

   echo "Date : ".$date;
   echo "bounce_count : ".$val['bounce_count'];
   echo "avg_time_on_site : ".$val['avg_time_on_site'];
   echo "===========================<br>";
}
于 2013-02-07T06:00:06.040 回答