php - Displaying an array that's within an array -


say have array, how assign variables values behind a,b,c,d , e? code:

<?php $request = "https://www.kimonolabs.com/api/6xlbn85i?apikey=daiceifxondovm18barko8uekzje1p6c&bondsnummer=21169152";  $response = file_get_contents($request); $results = json_decode($response, true); print_r($results); echo '<pre>'; print_r($results); echo '</pre>'; ?> 

and output:

array (     [name] => tennismix2     [count] => 1     [frequency] => on demand     [version] => 11     [newdata] =>      [lastrunstatus] => success     [lastsuccess] => wed nov 19 2014 08:34:23 gmt+0000 (utc)     [thisversionrun] => wed nov 19 2014 08:34:21 gmt+0000 (utc)     [thisversionstatus] => success     [url] => http://status.mandrillapp.com/     [results] => array         (             [collection1] => array                 (                     [0] => array                         (                             [a] => 21169152                             [b] => baal, a.j.w. van                             [c] => m                             [d] => 3                             [e] => 3                         )                  )          )  )     

we used api (kimonolabs) scrape data website furthest can get. appreciated.

$var1 =  $results['results']['collection1']['0']['a']; $var2 =  $results['results']['collection1']['0']['b']; $var3 =  $results['results']['collection1']['0']['c']; $var4 =  $results['results']['collection1']['0']['d']; $var5 =  $results['results']['collection1']['0']['e']; 

Comments

Popular posts from this blog

java - Oracle EBS .ClassNotFoundException: oracle.apps.fnd.formsClient.FormsLauncher.class ERROR -

c# - how to use buttonedit in devexpress gridcontrol -

nvd3.js - angularjs-nvd3-directives setting color in legend as well as in chart elements -