Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

> Sortowanie tablicy wg własnego wzoru
netvalue
post
Post #1





Grupa: Zarejestrowani
Postów: 199
Pomógł: 2
Dołączył: 9.06.2008

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


Witam

  1.  
  2. array(1) { ["myarr"]=> array(5) {
  3. [0]=> array(5) { ["symbol"]=> string(6) "EUR" ["desc"]=> string(6) "da" }
  4. [1]=> array(5) { ["symbol"]=> string(6) "USD" ["desc"]=> string(6) "adad" }
  5. [2]=> array(5) { ["symbol"]=> string(6) "CHF" ["desc"]=> string(6) "das23" }
  6. [3]=> array(5) { ["symbol"]=> string(6) "GBP" ["desc"]=> string(6) "dd12" }
  7. [4]=> array(5) { ["symbol"]=> string(6) "NOR" ["desc"]=> string(6) "233" }
  8. }
  9. }
  10.  


potrzebuje posortować ja symbol ale w kolejności takiej:
NOR, USD, EUR, CHF , GBP

Próbowałem z usort ale w tym przypadku chyba sie nie przyda...
Go to the top of the page
+Quote Post

Posty w temacie


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: 19.09.2025 - 18:41