Logo Issues w/ API

        foreach ($channels as $name) {
            $live[$name] = null;
            $chanLogo     =     "https://api.twitch.tv/kraken/channels/$name";
            $chandata     =     file_get_contents($chanLogo);
            $result         =     json_decode($chandata);
            $offlogo     =    $result->logo;
            }

Plus this in the echo:

$offSrc = file_exists($offlogo) ? $offlogo : “twitch-default.jpg”;

now shows the default image, however now it’s not showing the channel logo at all if there is a logo that actually exists. And still using the image of the last on the list for all streams. Progress but I’m still getting stumped.