If online show this, else show this (not working)

Thanks for the help there! That did help a lot! I only made one edit, there was still an instance of the $stream, which when I changed that over to $chandata now shows if it’s online or offline. Almost there, the issue now is that not getting the game for each specific channel that’s online. When it pulls that information, it’s showing the same game for all the online streams.

In this case, one is playing Mad Max, one if playing Eve Online, and one is playing League of Legends, but they all show up as playing Mad Max.

This can be seen here: http://icefaerie.org/twitch/

<?php // Channels to pull the stuff from $live = array(); $channels = array("themittanidotcom", "djyumene", "daopa", "nightblue3", "cabochardlol", "moanygamer"); // This part does stuff ... and things! No touchie! $streamData = json_decode(@file_get_contents("https://api.twitch.tv/kraken/streams?channel=".implode(",",$channels)), true); foreach ($channels as $name) { $live[$name] = null; } foreach ($streamData["streams"] as $chdata) { $live[$chdata["channel"]["name"]] = $chdata["channel"]; } foreach ($live as $name => $channel) { if($channel != null){ $game = $chdata['channel']['game']; echo " $name - Playing: $game
"; } else{ echo " $name is Offline
"; } } ?>