I have the following JSON response received from the client:
{
"name": "Joel",
"cities_visited": [{
"city1": "Chicago",
"city2": "Seattle"
}],
"active": true
}
I am using json_decode
to get the results but having problems inserting the cities_visited as one single set of data into mysql. I have also tried with json_decode($json, true)
with no luck.
Can anyone give me some insight how to get this data formatted properly prepared so i can insert into my db?
I need to somehow get this cities_visited array into one entry row on mysql and then be able to get it out and return it as the same with json_encode