How can I sort label in order:
1080p
720p
480p
360p
I've tried all Sorting Arrays in PHP documentation and some another "User Defined" sorting functions, but no luck, it shows completely random, not in order.
My original json:
[{"file":"***","label":"360p","default":"true","type":"video\/mp4"},
{"file":"***","label":"720p","type":"video\/mp4"},
{"file":"***","label":"1080p","type":"video\/mp4"},
{"file":"***","label":"480p","type":"video\/mp4"}]
explode()of each label of the array, then useintval()function to get int value of the string. Then sort by depending index