I have a list of channel names that are broadcasting a particular game in twitch.tv (api)
, so I can get all channels and list them.
The question is how to put them in a div
To be in blocks horizontally (as in the image) and also that when it reached 4 blocks (div´s)
, jump to the bottom line. >
<?php
$api2 = file_get_contents("https://api.twitch.tv/kraken/search/streams?client_id=g5ynk8n0llmefg9m70ruyg36bbt6si&query=fifa17&limit=100");
$defuse = json_decode($api2);
if($defuse == null){
echo "erro";
}else{
$total_lives=$defuse->_total;
echo "Toltal de Lives: ".$total_lives."</br>";
foreach($defuse->streams as $v)
echo "Nome do Canal: ".$v->channel->name."</br>";
}
?>