I have a json object that looks like this:
"Sunday":[
{
"low":"00:15",
"high":"00.45",
"mid":["00:30"]
},
{
"low":"01:15",
"high":"02.45",
"mid":["01:30","01:45","02:00","02:15","02:30"]
}
],
"Monday":[
{
"low":"00:15",
"high":"00.45",
"mid":["00:30"]
},
{
"low":"01:15",
"high":"02.45",
"mid":["01:30","01:45","02:00","02:15","02:30"]
}
]
i am using json_decode() method to make it an array which is something like this:
Array ( [Sunday] => Array ( [0] => Array ( [low] => 01:15 [high] => 02.45 [mid] => Array ( [0] => 01:30 [1] => 01:45 [2] => 02:00 [3] => 02:15 [4] => 02:30 ) ) [1] => Array ( [low] => 00.45 [high] => 00:30 [mid] => Array ( [0] => 01:30 [1] => 01:45 [2] => 02:00 [3] => 02:15 [4] => 02:30 ) ) ) )
the i am successfully able to get the above array from mysql and pass it to javascript with no issues, but i am confused on how to put the same json array back to the mysql.
mysql table looks like this: |ID|Day|Low|High|Mid|
Please help me know how to best approach this problem.
Thanks
Max