Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

> [PHP] Posortowanie tablicy według value
Elber
post 18.07.2014, 11:29:48
Post #1





Grupa: Zarejestrowani
Postów: 381
Pomógł: 12
Dołączył: 9.07.2007

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


Witam,

mam taki mały problemik wink.gif

Mam taką o tablice :

  1. (
  2. [0] => Array
  3. (
  4. [id] => 18
  5. [name] => xxx
  6. [delivelercode] => 132453
  7. [producerid] => 1
  8. [quantity] => 2
  9. )
  10.  
  11. [1] => Array
  12. (
  13. [id] => 7
  14. [name] => xxx
  15. [delivelercode] => 65324
  16. [producerid] => 1
  17. [quantity] => 1
  18.  
  19. )
  20.  
  21. [2] => Array
  22. (
  23. [id] => 14
  24. [name] => xxxxx
  25. [delivelercode] => 98718318
  26. [producerid] => 4
  27. [quantity] => 1
  28. )
  29.  
  30. [3] => Array
  31. (
  32. [id] => 14
  33. [name] => xxx
  34. [delivelercode] => 31422
  35. [producerid] => 4
  36. [quantity] => 1
  37. )
  38. )


i teraz chciałbym to posortować w taki sposób aby rekordy z producerid = 1 były w jednej tablicy a rekordy z producerid = 4 były w drugiej (dodam ze może być więcej producerid więc chodzi też o to żeby na sztywno tego nie przypisywać tylko aby robiło się to dynamiczni) tylko ni jak mi to nie wychodzi wink.gif


--------------------
GG: 564555
Go to the top of the page
+Quote Post

Posty w temacie


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

 



RSS Wersja Lo-Fi Aktualny czas: 7.07.2025 - 05:53