![]() |
![]() |
![]()
Post
#1
|
|
Grupa: Zarejestrowani Postów: 130 Pomógł: 0 Dołączył: 15.11.2011 Ostrzeżenie: (0%) ![]() ![]() |
Siemanko, Cześć (IMG:style_emoticons/default/smile.gif)
Mam oto coś takiego: 1. array
oraz 2 array
Finalnie chciałbym zsumować te same numery z 1 array i 2 array np: [83402A/vv/S] => 3 + [83402A/vv/S] => 5 = [83402A/vv/S] => 8 a jeżeli nie ma w którymś array to pokaż tylko wartość która jest np to : [83444A/vv/XS] => 5 Pomożecie (IMG:style_emoticons/default/questionmark.gif) ? (IMG:style_emoticons/default/smile.gif) (IMG:style_emoticons/default/biggrin.gif) Coś takiego chciałbym zobaczyć
Ten post edytował winiar789 30.05.2018, 12:13:56 |
|
|
![]() |
![]()
Post
#2
|
|
Grupa: Zarejestrowani Postów: 8 068 Pomógł: 1414 Dołączył: 26.10.2005 Ostrzeżenie: (0%) ![]() ![]() |
najpierw musisz zrobić merge kluczy z obu tablic tak żeby wynikowa miała wszystkie unikalne klucze
potem iterujesz po tej tablicy sprawdzając czy klucz jest w 1-sze , dodajesz wartość, a potem to samo dla klucza z 2-giej done (IMG:style_emoticons/default/smile.gif) |
|
|
![]() ![]() |
![]() |
Aktualny czas: 11.10.2025 - 12:16 |