搜索

首页  >  问答  >  正文

PHP同时返回多组json

我最近想开发一个论坛,所以就会联系到帖子(假如每次刷新出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\u5df1\u7684\u7f51\u7ad9\u6216APP","date":"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()但是满足不了要求。

继续百度不是看不懂,就是没有作用。

iAppiApp1618 天前971

全部回复(0)我来回复

暂无回复
  • 取消回复