create nested JSON object in php?

后端 未结 7 828
广开言路
广开言路 2020-12-09 16:25

I don\'t work with php much and I\'m a little fuzzy on object creation. I need to make a webservice request sending json and I think I have that part covered. Before I can

7条回答
  •  南笙
    南笙 (楼主)
    2020-12-09 17:01

    Use the in build function of PHP:

    json_encode();

    this will convert the array into JSON object.

提交回复
热议问题