Use PHP json_decode function to parse json object and insert into MySQL Database

On 12/09/2014 5 Comments so far

Hi, in this post we'll see how to parse json object, extract the data and push it into MySQL Database with PHP. As a web developer, we often come across situations to deal with API's and manipulate the output data. And those API's output will usually be in json format. PHP has a function named json_decode to parse json object and return them in an array format, which we can easily extract and process further.

This is our sample json object which we want to parse,

Contact Form

Name

Email *

Message *