Posted By

apphp-snippets on 01/27/14


php data json parsing apphp

Versions (?)

Creating and Parsing JSON Data in PHP

 / Published in: PHP


This code demonstrates how to create and parse the JSON data format of using array of PHP. It's a very simple code, that allows you to perform this task.

  1. <?php
  2. $json_data = array(
  3. 'id'=>1,'name'=>'jackson','country'=>'usa','office'=>array('google','oracle')
  4. );
  5. echo json_encode
  6. ($json_data);
  7. ?>

Report this snippet  

You need to login to post a comment.