PHP同時回傳多組json
iApp
iApp 2020-07-22 08:31:36
0
0
952

我最近想開發一個論壇,所以就會聯繫到帖子(假如每次刷新出20條),然後就得返回多組json數據,所以就遇到問題了。

我透過抓到以下訊息:

{"list":[{"username":"\u661f\u51cc\u793e\u533a","img":"[28.jpg ,29.jpg,30.jpg]","title":"\u3010\u7f6e\u9876\u3011XL Html\u5f00\u53d1\u5c5e\u4e8e\u81ea\u5dfdf11684u5c5e\u4e8e\u81ea\u5df116840u" :"2021-01-01 00:00:00","jing":"1","tid":"87","plnumber":"13"},{"username":"\u81f4\u8f9e. ","img":"[]","title":"\u8fd9\u662f\u6807\u9898\u3002","date":"2020-07-19 23:42:37","jing":" 0","tid":"725","plnumber":"0"},{"username":"\u81f4\u8f9e.","img":"[]","title":"xbxh", "date":"2020-07-19 23:19:22","jing":"0","tid":"724","plnumber":"0"},{"username":"\u81f4 \u8f9e.","img":"[199.png,200.png,201.png]","title":"fuu","date":"2020-07-19 23:13:37", "jing":"0","tid":"723","plnumber":"0"},{"username":"\u81f4\u8f9e.","img":"[,,]"," title":"gjhfududyd","date":"2020-07-16 09:51:16","jing":"0","tid":"722","plnumber":"0"},{ "username":"\u81f4\u8f9e.","img":"[196.png,197.png]","title":"xgj","date":"2020-07-16 09:43: 16","jing":"0","tid":"721","plnumber":"0"},{"username":"\u7528\u6237424112","img":"[]"," title":"\u725b\u903c\u80cc","date":"2020-07-08 20:19:40","jing":"0","tid":"720","plnumber":" 0"},{"username":"\u7528\u6237424112","img":"[192.txt]","title":"\u554a","date":"2020-07-08 20:16 :30","jing":"0","tid":"719","plnumber":"0"},{"username":"\u7528\u6237424112","img":"[]", "title":"\u592a\u68d2\u4e86","date":"2020-07-08 20:15:28","jing":"0","tid":"718","plnumber": "0"}]}

同時我也想讓他回傳這種格式的資料。

透過查詢資料只了解到:json_encode()但是滿足不了要求。

繼續百度不是看不懂,就是沒有作用。

iApp
iApp

全部回覆(0)
熱門教學
更多>
最新下載
更多>
網站特效
網站源碼
網站素材
前端模板