php decode json object

How to create a JSON Object in PHP?

JSON or JavaScript Object Notation is a powerful format that’s been used mainly whenever we need to include some kind of dynamic data fetching within our website, using JavaScript. It’s the ideal format when working and communicating with application programming interfaces. To create a JSON object in PHP you simply call the json_encode() function by passing an array of your choice as parameter. For instance, suppose we have an array of objects that contain an id and a label.$arr =...

Continue reading...