php - foreach with two kind of values -


<?php foreach ($array['response']['data']['offers'] $arr) {     $gegevens = array(         $arr['offer']['id'],         $arr['offer']['name'],         $arr['advertiser']['company'],         $arr['offer']['advertiser_id'],         $arr['offer']['offer_url'],         $arr['offer']['default_payout'],         $arr['offer']['expiration_date']     );     echo '<tr>';     foreach ($gegevens $value) {         echo "<td>{$value}</td>";     }     echo "</tr>\n"; } ?> 

this code have. how can search 2 kind of values inside foreach($array['response']['data']?

it has foreach($array['response']['data'][**offers**] , foreach($array['response']['data'][**advertisers**].

i need can echo out $arr['**offer**']['name'], $arr['**advertiser**'] ['company']

can me this?

in simplest:

foreach($array['response']['data']['offers'] $key => $offer_arr){     $advertiser_arr = $array['response']['data']['advertisers'][$key]; } 

you have offer array , advertiser array of same index


Comments

Popular posts from this blog

linux - Does gcc have any options to add version info in ELF binary file? -

android - send complex objects as post php java -

charts - What graph/dashboard product is facebook using in Dashboard: PUE & WUE -