title: Array does not remove all elements
body: <pre><code>$channels = array('imaqtpies','imsoff','zzero71tv', 'kaptenen', 'onlySinged', 'nightblue3') ;
  $nr = 0;
  
  
  $callAPI = implode(",",$channels);
  $online = 'online.png';     
  $offline = 'offline.png';   
  $json = file_get_contents('https://api.twitch.tv/kraken/streams?channel=' .     $callAPI);
  $dataArray = json_decode($json, true);
  
  foreach($dataArray['streams'] as $mydata){
      echo $mydata['channel']['name'] . ' is online';
      echo '&lt;br /&gt;&lt;hr /&gt;';
      unset($channels[$nr]);
      $nr++;
  }
  
  $newChannels = array_values($channels);;
  
  
  foreach($newChannels as $channel) {
      echo $channel . ' is offline';
      echo '&lt;br /&gt;&lt;hr /&gt;';
  }
  </code></pre>
  
  <p>Not all the names are echoed in the "offline" part and some names are being echoed twice (both in online and offline).</p>
  
  <p><img src="https://i.stack.imgur.com/KWvFx.png" alt="enter image description here"></p>