Return to Snippet

Revision: 65835
at January 27, 2014 21:04 by apphp-snippets


Initial Code
<?php
$json_data = array(
   'id'=>1,'name'=>'jackson','country'=>'usa','office'=>array('google','oracle')
);
echo json_encode
($json_data);
?>

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

Initial Description
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.

Initial Title
Creating and Parsing JSON Data in PHP

Initial Tags
php, data, json

Initial Language
PHP