I do not quite understand the PHP documentation for computer a multidimensional array by a field. In my case I have the following array and I want to sort it by typology, being associative:
array(4) {
[0]=>
array(90) {
["Juego"]=>
string(29) "Sniper Ghost Warrior 2 - Gold"
["Tipologia"]=>
string(11) "Complemento"
["Pertenece"]=>
string(38) "66acd000-77fe-1000-9115-d802435907d4; "
}
[1]=>
array(90) {
["Juego"]=>
string(16) "MK14 EBR & skins"
["Tipologia"]=>
string(11) "Juego"
["Pertenece"]=>
string(38) "66acd000-77fe-1000-9115-d802435907d4; "
}
[2]=>
array(90) {
["Juego"]=>
string(15) "Limited Edition"
["Tipologia"]=>
string(11) "Complemento"
["Pertenece"]=>
string(38) "66acd000-77fe-1000-9115-d802435907d4; "
}
[4]=>
array(90) {
["Juego"]=>
string(15) "Snipter Ghost Warrior Pase de Temporada"
["Tipologia"]=>
string(11) "Juego"
["Pertenece"]=>
string(38) "66acd000-77fe-1000-9115-d802435957d4; "
}
I want to see first those of the "Game" type, although I understand that you can choose between SORT_ASC
or SORT_DESC
.