Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

> [PHP]Tablice Allegro
ostry5
post
Post #1





Grupa: Zarejestrowani
Postów: 6
Pomógł: 0
Dołączył: 22.05.2013

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


Witam serdecznie.

Mam pytanko na temat wyciągania konkretnej informacji z tablicy wielowymiarowej:
Tablica wygląda tak:

  1. 1. won-items-counter | int
  2. Liczba ofert wygranych (odpowiadająca filtrom podanym na wejściu metody).
  3. 2. won-items-list | WonItemsStruct[]
  4. Tablica struktur zawierająca dokładne informacje o ofertach wygranych.
  5. 1. ite m-id | long
  6. Identyfikator oferty.
  7. 2. item-title | string
  8. Tytuł oferty.
  9. 3. item-thumbnail-url | string
  10. Odnośnik do miniaturki oferty.
  11. 4. item-price | ItemPriceStruct[]
  12. Tablica struktur zawierająca informacje o cenie przedmiotu.
  13. 1. price-type | int
  14. Rodzaj ceny (1 - Kup Teraz!, 6 - cena ostateczna w licytacji).
  15. 2. price-value | float
  16. Wartość ceny przedmiotu.


Jak wyciągnąć informację o np: Wartości ceny przedmiotu?
Go to the top of the page
+Quote Post
 
Start new topic
Odpowiedzi
ostry5
post
Post #2





Grupa: Zarejestrowani
Postów: 6
Pomógł: 0
Dołączył: 22.05.2013

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


Zrobiłem tak:

  1. $kupione = $client->doGetMyWonItems($nr_sesji);
  2. $kupione['won-items-list'][0]['item-price'][0]['price-value'];

Niestety w wyniku nie dostałem nic. Z kolei jak wymiotę

  1. var_dump($kupione);

to mi wywala całą tablicę



  1. array(2) {
  2. ["won-items-counter"]=>
  3. int(3)
  4. ["won-items-list"]=>
  5. array(3) {
  6. [0]=>
  7. object(stdClass)#12 (18) {
  8. ["item-id"]=>
  9. int(3202402253)
  10. ["item-title"]=>
  11. string(48) "Bateria do laptopa ASUS X52 X52D X52F X52J X52JC"
  12. ["item-thumbnail-url"]=>
  13. string(62) "http://img02.allegroimg.pl/photos/64x48/32/02/40/22/3202402253"
  14. ["item-price"]=>
  15. array(1) {
  16. [0]=>
  17. object(stdClass)#13 (2) {
  18. ["price-type"]=>
  19. int(1)
  20. ["price-value"]=>
  21. float(159)
  22. }
  23. }
  24. ["item-bought-quantity"]=>
  25. int(1)
  26. ["item-left-quantity"]=>
  27. int(0)
  28. ["item-quantity-type"]=>
  29. int(1)
  30. ["item-end-time"]=>
  31. int(1368947012)
  32. ["item-end-time-left"]=>
  33. string(11) "Zakończona"
  34. ["item-seller"]=>
  35. object(stdClass)#14 (5) {
  36. ["user-id"]=>
  37. int(11406155)
  38. ["user-login"]=>
  39. string(15) "PamiecAbsolutna"
  40. ["user-rating"]=>
  41. int(26786)
  42. ["user-icons"]=>
  43. int(56)
  44. ["user-country"]=>
  45. int(1)
  46. }
  47. ["item-bidders-counter"]=>
  48. int(1)
  49. ["item-category-id"]=>
  50. int(77756)
  51. ["item-views-counter"]=>
  52. int(14)
  53. ["item-note"]=>
  54. string(0) ""
  55. ["item-special-info"]=>
  56. int(1)
  57. ["item-shop-info"]=>
  58. int(1)
  59. ["item-product-info"]=>
  60. int(0)
  61. ["item-payu-info"]=>
  62. int(1)
  63. }
  64. [1]=>
  65. object(stdClass)#15 (18) {
  66. ["item-id"]=>
  67. int(3176588900)
  68. ["item-title"]=>
  69. string(46) "MIERNIK SYGNAŁU SATELITARNEGO B.DOKŁADNY SAT"
  70. ["item-thumbnail-url"]=>
  71. string(62) "http://img19.allegroimg.pl/photos/64x48/31/76/58/89/3176588900"
  72. ["item-price"]=>
  73. array(1) {
  74. [0]=>
  75. object(stdClass)#16 (2) {
  76. ["price-type"]=>
  77. int(1)
  78. ["price-value"]=>
  79. float(11.95)
  80. }
  81. }
  82. ["item-bought-quantity"]=>
  83. int(1)
  84. ["item-left-quantity"]=>
  85. int(19)
  86. ["item-quantity-type"]=>
  87. int(1)
  88. ["item-end-time"]=>
  89. int(1368607326)
  90. ["item-end-time-left"]=>
  91. string(11) "Zakończona"
  92. ["item-seller"]=>
  93. object(stdClass)#17 (5) {
  94. ["user-id"]=>
  95. int(5885969)
  96. ["user-login"]=>
  97. string(9) "AUTOFLASH"
  98. ["user-rating"]=>
  99. int(561)
  100. ["user-icons"]=>
  101. int(56)
  102. ["user-country"]=>
  103. int(1)
  104. }
  105. ["item-bidders-counter"]=>
  106. int(1)
  107. ["item-category-id"]=>
  108. int(67138)
  109. ["item-views-counter"]=>
  110. int(41)
  111. ["item-note"]=>
  112. string(0) ""
  113. ["item-special-info"]=>
  114. int(0)
  115. ["item-shop-info"]=>
  116. int(1)
  117. ["item-product-info"]=>
  118. int(0)
  119. ["item-payu-info"]=>
  120. int(1)
  121. }
  122. [2]=>
  123. object(stdClass)#18 (18) {
  124. ["item-id"]=>
  125. int(3193537042)
  126. ["item-title"]=>
  127. string(47) "PŁYTKA KLAWIATURY MIKROFON Samsung monte s5620"
  128. ["item-thumbnail-url"]=>
  129. string(62) "http://img19.allegroimg.pl/photos/64x48/31/93/53/70/3193537042"
  130. ["item-price"]=>
  131. array(1) {
  132. [0]=>
  133. object(stdClass)#19 (2) {
  134. ["price-type"]=>
  135. int(1)
  136. ["price-value"]=>
  137. float(1.99)
  138. }
  139. }
  140. ["item-bought-quantity"]=>
  141. int(1)
  142. ["item-left-quantity"]=>
  143. int(1)
  144. ["item-quantity-type"]=>
  145. int(1)
  146. ["item-end-time"]=>
  147. int(1367440370)
  148. ["item-end-time-left"]=>
  149. string(11) "Zakończona"
  150. ["item-seller"]=>
  151. object(stdClass)#20 (5) {
  152. ["user-id"]=>
  153. int(27930790)
  154. ["user-login"]=>
  155. string(7) "SerwALL"
  156. ["user-rating"]=>
  157. int(111)
  158. ["user-icons"]=>
  159. int(56)
  160. ["user-country"]=>
  161. int(1)
  162. }
  163. ["item-bidders-counter"]=>
  164. int(3)
  165. ["item-category-id"]=>
  166. int(16427)
  167. ["item-views-counter"]=>
  168. int(42)
  169. ["item-note"]=>
  170. string(0) ""
  171. ["item-special-info"]=>
  172. int(0)
  173. ["item-shop-info"]=>
  174. int(0)
  175. ["item-product-info"]=>
  176. int(0)
  177. ["item-payu-info"]=>
  178. int(1)
  179. }
  180. }
  181. }

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: 14.10.2025 - 08:33