<h4 class="panel-heading">Most Pentakills</h4> <div class="panel-body"> <div class="col-xs-4"> <div style="width: 100%"> <canvas id="dough' . $i . '" height="300"></canvas> </div> </div> <div class=col-xs-3"> <div id="legendDiv' . $i . '" class="chart-legend"></div> </div> </div> </div> </div> </div> </div>'; $popChamps = champions($regions[$i]); usort($popChamps, function ($a, $b) { return $b['played'] - $a['played']; }); $onload .= ' var ctx' . $i . ' = document.getElementById("barchart' . $i . '").getContext("2d"); window.myBar = new Chart(ctx' . $i . ').Bar(barData' . $i . ', { responsive : true, scaleFontColor: "#ffffff" }); var bar' . $i . ' = document.getElementById("bar' . $i . '").getContext("2d"); window.myBar = new Chart(bar' . $i . ').Bar(barData2' . $i . ', { responsive : true, scaleFontColor: "#ffffff" });
$stack2 = count($regions); $champion = array(); if (isset($_GET['id'])) { $get = $_GET['id']; for ($i = 0; $i < $stack; $i++) { if ($champdata[$i]['id'] == $get) { $valid = true; $index = $i; $champId = $champdata[$i]['id']; } } } if ($valid) { /*echo champion data contents*/ for ($y = 0; $y < $stack2; $y++) { $champ = champions($regions[$y]); foreach ($champ as $each) { if ($each['champId'] == $champId) { array_push($champion, $each); break; } } } for ($z = 0; $z < $stack2; $z++) { $items = champItems2($regions[$z], $champId); $region .= ' <tr> <td>' . strtoupper($regions[$z]) . '</td> <td>' . $champion[$z]['played'] . '</td> <td>' . $champion[$z]['winrate'] . ' %</td> <td>' . $champion[$z]['pentas'] . '</td>