How to insert json array into mysql database

前端 未结 6 991
春和景丽
春和景丽 2020-12-05 11:46

Hi I\'m trying to insert the json array into my MySQL database. I\'m passing the data form my iphone there i have converted the data into json format and I\'m passing the da

6条回答
  •  北荒
    北荒 (楼主)
    2020-12-05 12:13

    There is no such variable as $data. Try

    $obj = json_decode($json,true);
    

    Rest looks fine. If the error still persists, enable error_reporting.

提交回复
热议问题