Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

> Dodanie Array te same wartości
winiar789
post
Post #1





Grupa: Zarejestrowani
Postów: 130
Pomógł: 0
Dołączył: 15.11.2011

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


Siemanko, Cześć smile.gif

Mam oto coś takiego:

1. array
  1.  
  2. (
  3. [83402A/vv/S] => 5
  4. [83402A/vv/M] => 4
  5. [83402A/vv/XL] => 3
  6. [84401A/vv/S] => 1
  7. [84401A/vv/M] => 3
  8. [84401A/vv/L] => 1
  9. [84401A/vv/XL] => 4
  10. [83402A/vv/XS] => 5
  11. [83402A/vv/L] => 5
  12. [84401A/vv/XS] => 5
  13. )
  14.  
  15.  


oraz 2 array

  1.  
  2. (
  3. [83402A/vv/S] => 3
  4. [83402A/vv/M] => 1
  5. [83402A/vv/XL] => 3
  6. [84401A/vv/S] => 21
  7. [84401A/vv/M] => 33
  8. [84401A/vv/L] => 31
  9. [84401A/vv/XL] => 43
  10. [83444A/vv/XS] => 5
  11. [83444A/vv/L] => 5
  12. [84444A/vv/XS] => 5
  13. )
  14.  


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 questionmark.gif? smile.gif biggrin.gif

Coś takiego chciałbym zobaczyć

  1.  
  2.  
  3. (
  4. [83402A/vv/S] => 8
  5. [83402A/vv/M] => 5
  6. [83402A/vv/XL] => 6
  7. [84401A/vv/S] => 22
  8. [84401A/vv/M] => 36
  9. [84401A/vv/L] => 34
  10. [84401A/vv/XL] => 44
  11. [83402A/vv/XS] => 5
  12. [83402A/vv/L] => 5
  13. [84401A/vv/XS] => 5
  14. [83444A/vv/XS] => 5
  15. [83444A/vv/L] => 5
  16. [84444A/vv/XS] => 5
  17. )
  18.  
  19.  


Ten post edytował winiar789 30.05.2018, 12:13:56
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 Aktualny czas: 20.08.2025 - 05:07