changefuture

PHP 解析JSON数组

<?php 

    $postArray =\'[{"data":{"hello":"world"},"type":"1234","date":"2012-10-30 17:6:9","user":"000000000000000","time_stamp":1351587969902}, {"data":{"hello":"world"},"type":"1234","date":"2012-10-30 17:12:53","user":"000000000000000","time_stamp":1351588373519}]\';
     
    
    $de_json = json_decode($postArray,TRUE);
      $count_json = count($de_json);
        for ($i = 0; $i < $count_json; $i++)
           {
                //echo var_dump($de_json);
 
                  $dt_record = $de_json[$i][\'date\'];
                   $data_type = $de_json[$i][\'type\'];
                  $imei = $de_json[$i][\'user\'];
                  $message = json_encode($de_json[$i][\'data\']);

                }

?>
发表于 2012-10-30 18:56  vertexes  阅读(83337)  评论(0编辑  收藏  举报
 

分类:

技术点:

相关文章:

  • 2022-03-09
  • 2021-11-27
  • 2022-12-23
  • 2021-11-30
  • 2021-11-17
  • 2021-11-30
  • 2021-11-17
猜你喜欢
  • 2022-01-09
  • 2021-11-23
  • 2021-11-18
  • 2022-02-15
  • 2021-11-17
相关资源
相似解决方案