Creating and Parsing JSON Data in PHP


/ Published in: PHP
Save to your folder(s)

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.


Copy this code and paste it in your HTML
  1. <?php
  2. $json_data = array(
  3. 'id'=>1,'name'=>'jackson','country'=>'usa','office'=>array('google','oracle')
  4. );
  5. ($json_data);
  6. ?>

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

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.