Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

> [PHP] Sortowanie tablicy według jednej wartości
lsrtb
post
Post #1





Grupa: Zarejestrowani
Postów: 26
Pomógł: 0
Dołączył: 22.11.2015

Ostrzeżenie: (0%)
-----


Jak posortować taką tablicę:

  1.  
  2. (
  3. [0] => Array
  4. (
  5. [0] => PO317XU
  6. [1] => PO789YV
  7. )
  8.  
  9. [1] => Array
  10. (
  11. [0] => BGN2024
  12. [1] => BGN2080
  13. )
  14.  
  15. [2] => Array
  16. (
  17. [0] => BGN2025
  18. [1] => BGN2070
  19. )
  20.  
  21. [3] => Array
  22. (
  23. [0] => FG0251C
  24. [1] => FG94523
  25. )
  26.  
  27. [4] => Array
  28. (
  29. [0] => DLWCF84
  30. [1] => DLW53WP
  31. )
  32.  
  33. [5] => Array
  34. (
  35. [0] => RZ7381K
  36. [1] => RZ3553P
  37. )
  38.  
  39. [6] => Array
  40. (
  41. [0] => RZ9613K
  42. [1] => RZ3703P
  43. )
  44.  
  45. )
  46.  


Według pierwszej wartości?

Doszedłem do takiego momentu i nie mogę dalej dopisać tych drugich wartości:

  1. (
  2. [0] => Array
  3. (
  4. [0] => BGN2024
  5. )
  6.  
  7. [1] => Array
  8. (
  9. [0] => BGN2025
  10. )
  11.  
  12. [2] => Array
  13. (
  14. [0] => DLWCF84
  15. )
  16.  
  17. [3] => Array
  18. (
  19. [0] => FG0251C
  20. )
  21.  
  22. [4] => Array
  23. (
  24. [0] => PO317XU
  25. )
  26.  
  27. [5] => Array
  28. (
  29. [0] => RZ7381K
  30. )
  31.  
  32. [6] => Array
  33. (
  34. [0] => RZ9613K
  35. )
  36.  
  37. )


Proszę o pomoc, bo walczę z tym godzinę już.
Go to the top of the page
+Quote Post
 
Start new topic
Odpowiedzi (1 - 1)
nospor
post
Post #2





Grupa: Moderatorzy
Postów: 36 557
Pomógł: 6315
Dołączył: 27.12.2004




http://php.net/manual/en/function.usort.php
Go to the top of the page
+Quote Post

Reply to this topicStart new topic
2 Użytkowników czyta ten temat (2 Gości i 0 Anonimowych użytkowników)
0 Zarejestrowanych:

 



RSS Aktualny czas: 23.08.2025 - 23:32