Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

> [PHP] Łączenie tablic
Kshyhoo
post 13.09.2016, 22:54:07
Post #1





Grupa: Opiekunowie
Postów: 3 855
Pomógł: 317
Dołączył: 4.01.2005
Skąd: że




Jak mam połączyć dwie tablice:
  1. array(23) {
  2. [0]=>
  3. array(2) {
  4. ["id"]=>
  5. string(1) "1"
  6. ["name"]=>
  7. string(16) "jeden"
  8. }
  9. [1]=>
  10. array(2) {
  11. ["id"]=>
  12. string(1) "2"
  13. ["name"]=>
  14. string(17) "dwa"
  15. }
  16. [2]=>
  17. array(2) {
  18. ["id"]=>
  19. string(1) "3"
  20. ["name"]=>
  21. string(18) "trzy"
  22. }
  23. [3]=>
  24. array(2) {
  25. ["id"]=>
  26. string(1) "4"
  27. ["name"]=>
  28. string(14) "cztery"
  29. }
  30. }
  31.  
  32. array(1) {
  33. [0]=>
  34. array(23) {
  35. ["a1"]=>
  36. string(1) "2"
  37. ["a2"]=>
  38. string(1) "0"
  39. ["a3"]=>
  40. string(1) "0"
  41. ["a4"]=>
  42. string(1) "0"
  43. }
  44. }

Chciałbym je połączyć w jedną. Umiem, jeżeli są takie same, tu poległem.
Nie muszę mieć unikalnych kluczy, mogą być z pierwszej tablicy.


--------------------
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 - 22:54