How to use JSON with Jquery?

前端 未结 3 1712
盖世英雄少女心
盖世英雄少女心 2020-12-06 07:39

I\'m working at an app which would make a POST ajax request to a PHP script on my server. The script would query the database and return a row of records, as an array. (One

3条回答
  •  暗喜
    暗喜 (楼主)
    2020-12-06 08:00

    You can return the JSON encoded string to the JS by echoing it with a Content-Type of application/json.

    See above answer for the rest.

提交回复
热议问题