Link to home
Start Free TrialLog in
Avatar of Chris Andrews
Chris AndrewsFlag for United States of America

asked on

How to use/display arrayed results from json decode? Example needed

Ok, I've got json data and decoded it with json_decode:

      $data = json_decode($json_info,true);

when I do this:

      var_dump($data);

I get results like this:

   http://shoutkey.com/expulsion

Now that I've got that array.... I'm not sure how to use it.

Can you give me an example of code that will display the first six results for the ChannelName, DisplayTime and ProgramTitle, after they are parsed, so I have:

ChannelName value 1, DisplayTime value 1, ProgramTitle value 1
ChannelName value 2, DisplayTime value 2, ProgramTitle value 2
ChannelName value 3, DisplayTime value 3, ProgramTitle value 3
ChannelName value 4, DisplayTime value 4, ProgramTitle value 4
ChannelName value 5, DisplayTime value 5, ProgramTitle value 5

Big ask I know, I would really appreciate the help!
ASKER CERTIFIED SOLUTION
Avatar of Member_2_248744
Member_2_248744
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Chris Andrews

ASKER

Got it!

I had to change the 'for' to this:

for ($i = 0; $i <= 5; $i++) {   //based on example at php.net

but you got me going in the right direction here - thank you very much!

Chris