Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

> [PHP] Wyciaganie elementu z tablicy wielowymiarowej
motorolka24
post 17.02.2011, 00:23:24
Post #1





Grupa: Zarejestrowani
Postów: 90
Pomógł: 0
Dołączył: 21.04.2007

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


Jak można wyciągnąć z poniższej tablicy element array( "id" => "1","url" => "aa.html","name" => "aa") podając id = 1. Najlepiej żeby było to bez użycia pętli lub rekurencji
  1. $tablica = array( array( "id" => "1",
  2. "url" => "aa.html",
  3. "name" => "aa"
  4. ),
  5. array( "id" => "2",
  6. "url" => "bb.html",
  7. "name" => "bb",
  8. ),
  9. array( "id" => "3",
  10. "url" => "cc.html",
  11. "name" => "cc"
  12. )
  13. );
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: 24.07.2025 - 23:33