Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

> [PHP] 2 tablice w jedna
dariolee
post 17.04.2009, 08:13:56
Post #1





Grupa: Zarejestrowani
Postów: 81
Pomógł: 0
Dołączył: 18.04.2007

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


Witam,
Mam dwie tablice:
Array1 ( [1] => 3 [4] => 0 [5] => 0 [8] => 0 [10] => 0 )
i
Array2 ( [0] => Array ( [id_komorka] => 1 [nazwa_krotka] => Firma1 )
[1] => Array ( [id_komorka] => 4 [nazwa_krotka] => Firma2 )
[2] => Array ( [id_komorka] => 5 [nazwa_krotka] => Firma3 )
[3] => Array ( [id_komorka] => 8 [nazwa_krotka] => Firma4 )
[4] => Array ( [id_komorka] => 10 [nazwa_krotka] => Firma5 ) )

Najlepiej to byłoby jakbym w Array1 podmienił klucze na wartość [nazwa_krotka] tj. Array1 ( [Firma1] => 3 [Firma2] => 0 [Firma3] => 0 [Firma4] => 0 [Firma5] => 0 ) Albo stworzył nowa tabele z identycznym układem Array3 ( [Firma1] => 3 [Firma2] => 0 [Firma3] => 0 [Firma4] => 0 [Firma5] => 0 )
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: 13.08.2025 - 23:18