lundi 9 février 2015

Most efficient way to sort a multidimensional array (php)

I am looking for the most efficient way to sort a multidimensional array in php.I want to sort the array by the value name in [result][index][kl][0]. What is the fastest way to do this? My array has like 100 elements. My array looks like this:



Array
(
[jsonrpc] => 2.0
[id] => req-002
[result] => Array
(
[0] => Array
(
[type] => subst
[lsid] => 11
[date] => 20150209
[startTime] => 955
[endTime] => 1040
[kl] => Array
(
[0] => Array
(
[id] => 29
[name] => S12UB
)

)

)

[1] => Array
(
[type] => subst
[lsid] => 11
[date] => 20150209
[startTime] => 1045
[endTime] => 1130
[kl] => Array
(
[0] => Array
(
[id] => 29
[name] => S12UB
)

)

)


Thank you.





Aucun commentaire:

Enregistrer un commentaire