Over a million developers have joined DZone.

Creating and Parsing JSON Data 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.

echo json_encode

// Result:
// {"id":1,"name":"jackson","country":"usa","office":["google","oracle"]}

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}