Posted By

apphp-snippets on 01/27/14


Tagged

php data json parsing apphp


Versions (?)

Creating and Parsing JSON Data in PHP


 / Published in: PHP
 

URL: http://www.apphp.com/index.php?snippet=php-create-and-parse-json-data

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.