所以我有一个看起来像https://api.myjson.com/bins/zux0q的json文件(也在下面的文本中]
{"beryllium":[{"oem":"Xiaomi","maintainer":"Lup Gabriel ","nick":"gwolfu","crversion":"6.0","builddate":"20191110","download":"https://url","forum":"https://url"}],"cheeseburger":[{"oem":"OnePlus","maintainer":"Pranav Vashi ","nick":"neobuddy89","crversion":"6.0","builddate":"20191107","download":"https://url","forum":"https://url"}],"enchilada":[{"oem":"OnePlus","maintainer":"Hildo Boerboom ","nick":"firebird11","crversion":"6.0","builddate":"20191102","download":"https://url","forum":"https://url"}],"fajita":[{"oem":"OnePlus","maintainer":"Hildo Boerboom ","nick":"firebird11","crversion":"6.0","builddate":"20191102","download":"https://url","forum":"https://url"}],"guacamole":[{"oem":"OnePlus","maintainer":"Lup Gabriel ","nick":"gwolfu","crversion":"6.0","builddate":"20191110","download":"https://url","forum":"https://url"}],"oneplus2":[{"oem":"OnePlus","maintainer":"Lucian Iordache ","nick":"lucyr03","crversion":"6.0","builddate":"20191103","download":"https://url","forum":"https://url"}]}
现在,我想按OEM字母顺序,然后按键名排序我尝试了一些代码,但只能按键名对其进行排序,并且脱离了主意我需要一些多维数组排序所以像这样]
OnePlus =>> cheeseburger =>> maintainer:... nick:... crversion:... builddate:... download:... forum:... enchilada ==> maintainer:... nick:... crversion:... builddate:... download:... forum:... fajita ==> maintainer:... nick:... crversion:... builddate:... download:... forum:... guacamole ==> maintainer:... nick:... crversion:... builddate:... download:... forum:... oneplus2 ==> maintainer:... nick:... crversion:... builddate:... download:... forum:... Xiaomi ==> beryllium ==> maintainer:... nick:... crversion:... builddate:... download:... forum:...
非常感谢您的帮助!加百利
所以我有一个看起来像https://api.myjson.com/bins/zux0q的json文件(下面还有文字){“铍”:[{“ oem”:“小米”,“维护者”:” Lup Gabriel“,” nick“:” gwolfu“,” crversion“:” 6.0“,” builddate“:” ...
假设您已经阅读了json文件,并将其内容转换为如下所示的PHP数组: