json字符串数据原先是使用text进行存储的,字典格式会保持原有的顺序。
但是该为json后,变失去了顺序性。
如何在json格式里保持?
PHP中文网2017-04-17 16:17:38
json is naturally unordered, just like js. For reference
If you want to maintain the order when outputting, add a key-value pair to json"sort":"a,b,c"
, and loop according to the order of the sort value when outputting