Sort an array of array

时间:2017-06-15 09:42:10

标签: php arrays sorting

Here is my array

array (size=167)
  0 => 
    array (size=6)
      'id' => string '41' (length=2)
      'creation_date' => string '04/01/16' (length=8)
      'nom' => string 'toto' (length=4)
      'product' => string ' (length=70)
      'type' => string 'En cours' (length=8)
      'etat' => string 'Projet classique' (length=16)
  1 => 
    array (size=6)
      'id' => string '43' (length=2)
      'creation_date' => string '04/01/16' (length=8)
      'nom' => string 'poikl' (length=5)
      'product' => string '' (length=70)
      'type' => string 'En cours' (length=8)
      'etat' => string 'Projet classique' (length=16)
  2 => 
    array (size=6)
      'id' => string '44' (length=2)
      'creation_date' => string '04/01/16' (length=8)
      'nom' => string 'mac' (length=3)
      'product' => string '' (length=70)
      'type' => string 'En cours' (length=8)
      'etat' => string 'Projet classique' (length=16)
  ...

I want to sort in alphabetical order this array in PHP looking for the 'nom' key, so i want my array to look exactly the same but ordered by the 'nom' key . I've not find in my research a situation like this so i'm deeply sorry to ask a maybe obvious question

0 个答案:

没有答案