Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

> [PHP] Tablica zliczanie ?
Fifi209
post
Post #1





Grupa: Zarejestrowani
Postów: 4 655
Pomógł: 556
Dołączył: 17.03.2009
Skąd: Katowice

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


Otóż mam tablicę (dla przykładu) :

CODE

Array
(
[0] => Array
(
[0] => 2
[1] => gold ingots
)

[1] => Array
(
[0] => 93
[1] => gold coins
)

[2] => Array
(
[0] => 72
[1] => gold coins
)

[3] => a spellbook of dark mysteries
[4] => Array
(
[0] => 32
[1] => small rubies
)

[5] => glacier kilt
[6] => an abyss hammer
[7] => a havoc blade
[8] => a berserker
[9] => a mastermind shield
[10] => Ferumbras' hat
[11] => Array
(
[0] => 2
[1] => gold ingots
)

[12] => Array
(
[0] => 93
[1] => gold coins
)

[13] => Array
(
[0] => 78
[1] => gold coins
)

[14] => a spellbook of dark mysteries
[15] => Array
(
[0] => 32
[1] => small rubies
)

[16] => glacier kilt
[17] => an abyss hammer
[18] => a havoc blade
[19] => a berserker
[20] => a mastermind shield
[21] => Ferumbras' hat
[22] => Array
(
[0] => 2
[1] => gold ingots
)

[23] => Array
(
[0] => 93
[1] => gold coins
)

[24] => Array
(
[0] => 71
[1] => gold coins
)

[25] => a spellbook of dark mysteries
[26] => Array
(
[0] => 32
[1] => small rubies
)

[27] => glacier kilt
[28] => an abyss hammer
[29] => a havoc blade
[30] => a berserker
[31] => a mastermind shield
[32] => Ferumbras' hat
)


Teraz chciałbym jakoś zliczyć np. small rubies, glacier kilt etc. czyli wszystko co się powtarza do siebie dodać. (IMG:http://forum.php.pl/style_emoticons/default/haha.gif)

Ma ktoś pomysł? Bo już doprowadziłem ze stringu do takiego stanu, że wcale to nie powinno być trudne jednak mój umysł sobie o tej godzinie z tym nie radzi. (IMG:http://forum.php.pl/style_emoticons/default/haha.gif)
Go to the top of the page
+Quote Post

Posty w temacie


Reply to this topicStart new topic
2 Użytkowników czyta ten temat (2 Gości i 0 Anonimowych użytkowników)
0 Zarejestrowanych:

 



RSS Aktualny czas: 26.09.2025 - 18:54