Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

> [PHP]Odwolanie do tablicy, jak wydobyc jeden element
yalus
post
Post #1





Grupa: Zarejestrowani
Postów: 281
Pomógł: 0
Dołączył: 8.07.2005
Skąd: EU

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


Witam,

probuje wydobyc z tablicy jeden element, ale tablica jest tak rozbudowana ze juz sie w tym pogubilem. czy moglby mi ktos pomoc?

oto zawartosc tablicy:

jest to wydruk czesci sesji za pomoca print_r($_SESSION) a ja chcialbym wydobyc ten element ktory jest pogrubiony:
(nieststy nie da sie go wyroznic za pomoca bold

element znajduje sie tutaj: ----------ten element------->[qty] => 1<--------chcialbym wyciagnac--------


  1. Array ( [securityToken] => 0ba738c6223573355c66bd66b1037ffa [customers_host_address] => host-xxx-xxx-xxx-xxx.static.as13285.net [cartID] => [cart] => shoppingCart Object ( [contents] => Array ( [2] => Array ( ----------ten element------->[qty] => 1<--------chcialbym wyciagnac-------- ) [3] => Array ( [qty] => 1 ) ) [total] => 2.49 [weight] => 0 [cartID] => 60819 [content_type] => [free_shipping_item] => 2 [free_shipping_weight] => 30 [free_shipping_price] => 2.49 ) [navigation] => navigationHistory Object ( [path] => Array ( [0] => Array ( [page] => logoff [mode] => NONSSL [get] => [post] => Array ( ) ) [1] => Array ( [page] => index [mode] => NONSSL [get] => Array ( [cPath] => 1_4 ) [post] => Array ( ) ) [2] => Array ( [page] => product_info [mode] => NONSSL [get] => Array ( [cPath] => 1_4 [products_id] => 2 ) [post] => Array ( ) ) ) [snapshot] => Array ( ) ) [check_valid] => true [language] => english [languages_id] => 1 [languages_code] => en [currency] => GBP [today_is] => 2010-05-01 [updateExpirations] => 1 [category_tree] => SimpleCategoriesTree Object ( [category_tree] => Array ( [1] => Array ( [name] => Three Tariffs [parent_id] => 0 [path] => Array ( [0] => 1 ) [sub_cats] => Array ( [0] => 4 [1] => 5 [2] => 6 [3] => 7 [4] => 8 [5] => 13 [6] => 14 [7] => 16 [8] => 17 [9] => 18 [10] => 19 [11] => 20 [12] => 21 [13] => 22 [14] =>



poprostu chcialbym otrzymac cos takiego:


  1. echo $_SESSION[cart...qty]


a w wyniku otrzymac 1


jakies wskazowki jak sie odwolac do tego elementu tablicy?


pozdrawiam



--------------------
człowiek nie sznurek wszystko wytrzyma
Go to the top of the page
+Quote Post

Posty w temacie
- yalus   [PHP]Odwolanie do tablicy   1.05.2010, 12:37:40
- - mortus   Wyświetl sobie to samo za pomocą[PHP] pobierz, pla...   1.05.2010, 13:15:18
- - yalus   ok, dzieki biore sie do roboty   1.05.2010, 13:23:31


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: 19.08.2025 - 16:31