Hallo,
ik lees inmiddels succesvol gegevens uit van mijn leverancier. Echter krijg ik de waardes uit de array niet goed in afzonderlijke variabelen die ik vandaaruit in html tabellen wil plaatsen...
voor nu is dit mijn code...
Mijn output zet het als volgt op het scherm
Wie o wie kan mij helpen?
ik lees inmiddels succesvol gegevens uit van mijn leverancier. Echter krijg ik de waardes uit de array niet goed in afzonderlijke variabelen die ik vandaaruit in html tabellen wil plaatsen...
voor nu is dit mijn code...
PHP:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
| foreach ($productitemsearch->ProductItemSearchResult->productdata as $key => $att) { if(!is_object($att)) { //echo "$key --- $att<br>"; /*Laat algemene gameinfo zien */ } else { foreach($att->Shops as $shop) { $shops[$shop->shop_id] = array('name'=>$shop->shopname, 'logo'=>$shop->shoplogo, 'levertijd'=>$shop->levertijd,'price'=>$shop->price/100,'postage'=>$shop->postage, 'cp_type'=>$shop->cp_type, 'product_url' => $shop->producturl); } } } foreach ($shops as $id=>$shop_info) { //echo "---- Shop ID $id<br>"; /*Laat shopid zien */ foreach ($shop_info as $key=>$value) { echo "- $key - $value - <br/>"; } } |
Mijn output zet het als volgt op het scherm
Ik wil de gegevens dus afzonderlijk kunnen filteren en volgens mij kan dat alleen als je ze in aparte variabelen zet. Dat heb ik al op onderstaande wijze geprobeerd maar dan onthoud hij alleen de laatste waarde.- name - Wehkamp.nl -
- logo - http://hwimages.beslist.n.../shop_images/LARGE/19.png -
- levertijd - 3 - 4 werkdagen -
- price - 56.69 -
- postage - 195 -
- cp_type - -
- product_url - http://www.beslist.nl/loa...nAs2VInBD9Gri0ZFLBNhMh48= -
- name - Nedgame.nl -
- logo - http://hwimages.beslist.n.../shop_images/LARGE/37.png -
- levertijd - Op werkdagen voor 16:00 uur besteld, volgende dag in huis -
- price - 59 -
- postage - 195 -
- cp_type - -
- product_url - http://www.beslist.nl/loa...4YGitOLRXRITVce78wuzmpQQ= -
- name - bol.com -
- logo - http://hwimages.beslist.n...s/shop_images/LARGE/1.png -
- levertijd - Op werkdagen voor 23:00 uur besteld, volgende dag in huis -
- price - 64.99 -
- postage - 0 -
- cp_type - -
- product_url - http://www.beslist.nl/loa...kgAEOSVfzOXd6JUQf2FDMcUg= -
- name - Dixons.nl -
- logo - http://hwimages.beslist.n...hop_images/LARGE/2369.png -
- levertijd - Op werkdagen voor 23:30 uur besteld, volgende dag in huis -
- price - 64.99 -
- postage - 0 -
- cp_type - -
- product_url - http://www.beslist.nl/loa...5-iBGNftLuYdWXx9kvoSr9M0= -
- name - MyCom.nl -
- logo - http://hwimages.beslist.n...shop_images/LARGE/596.png -
- levertijd - Op werkdagen voor 23:30 uur besteld, volgende dag in huis -
- price - 64.99 -
- postage - 0 -
- cp_type - -
- product_url - http://www.beslist.nl/loa...0cyBre0uO0Roxr8C4ujdUuNY= -
- name - Intertoys.nl -
- logo - http://hwimages.beslist.n...hop_images/LARGE/5077.png -
- levertijd - 1 - 3 werkdagen -
- price - 67.99 -
- postage - 199 -
- cp_type - -
- product_url - http://www.beslist.nl/loa...H36bM/N0WyJLr9etUCrvEzGU= -
- name - All4games.nl -
- logo - http://hwimages.beslist.n...op_images/LARGE/19560.png -
- levertijd - 2 weken -
- price - 68.4 -
- postage - 0 -
- cp_type - -
- product_url - http://www.beslist.nl/loa...UA1PWPWt0M-xwM4/aIlKYZ10= -
- name - DVDoutlet.nl -
- logo - http://hwimages.beslist.n...shop_images/LARGE/170.png -
- levertijd - 1 werkdag -
- price - 73.79 -
- postage - 99 -
- cp_type - -
- product_url - http://www.beslist.nl/loa...wxBRfCM6W665RQ2XerTvMImo= -
- name - Eci.nl -
- logo - http://hwimages.beslist.n...shop_images/LARGE/171.png -
- levertijd - Op werkdagen voor 15:00 uur besteld, volgende dag in huis -
- price - 78.99 -
- postage - 0 -
- cp_type - -
- product_url - http://www.beslist.nl/loa...HS8P57ex7hHyHk9q1sRZd5LI= -
- name - Cosmox.nl -
- logo - http://hwimages.beslist.n...hop_images/LARGE/1937.png -
- levertijd - Op werkdagen voor 15:00 uur besteld, volgende dag in huis -
- price - 78.99 -
- postage - 0 -
- cp_type - -
- product_url - http://www.beslist.nl/loa...m2/lOeaBby3Brz7xHmqmczFM= -
- name - Freerecordshop.nl -
- logo - http://hwimages.beslist.n.../shop_images/LARGE/18.png -
- levertijd - Op werkdagen voor 15:00 uur besteld, volgende dag in huis -
- price - 79.99 -
- postage - 0 -
- cp_type - -
- product_url - http://www.beslist.nl/loa...gRwC0Vejr/dfSv23sHJb9HHE= -
PHP:
1
| extract(array('name'=>$vz->shopname, 'logo'=>$shop->shoplogo, 'levertijd'=>$shop->levertijd,'price'=>$shop->price/100,'postage'=>$shop->postage, 'cp_type'=>$shop->cp_type, 'product_url' => $shop->producturl), EXTR_PREFIX_SAME, "var"); |
Wie o wie kan mij helpen?