Serie D Girone E
[source]
<?php
$param1=”ecce”;
$url = file_get_contents(‘http://www.campionandoalivorno.it/iwebkit/get_classifica.asp?camp=2018seried.mdb’);
$json = json_decode($url, true);
//print_r($json);
?>
<div class=”row”>
<div id=”no-more-tables”>
<table class=”col-md-12 table-bordered table-striped table-condensed cf”>
<thead class=”cf”>
<tr>
<th>N</th>
<!–<th></th>–>
<th>SQUADRA</th>
<th class=”numeric”>PT</th>
<th class=”numeric”>G</th>
<th class=”numeric”>V</th>
<th class=”numeric”>N</th>
<th class=”numeric”>P</th>
<th class=”numeric”>GF</th>
<th class=”numeric”>GS</th>
<th class=”numeric”>D</th>
</tr>
</thead>
<tbody>
<?php
for ($i = 0, $n = count($json[“classifica”]) ; $i < $n ; $i++)
{
if($i+1 == 1){
$class= “background: #50ff08”;
}else {
$class= “” ;}
if($i+1 > 1 && $i+1 <= 5) {
$class1= “background: #b0f395”;
}else {
$class1= “”; }
if($i+1 > 14 && $i+1 <= 18){
$class2= “background: #ffd2d2”;
}else {
$class2= “” ;}
if($i+1 > 18 && $i+1 <= 20) {
$class3= “background: #ff0000; color: #fff;”;
}else {
$class3= “”; }
echo ‘<tr style=”‘, $class, $class1, $class2, $class3, ‘”>’;
echo ‘<td>’, $i+1, ‘</td>’ ;
//echo ‘<td data-title=””>’, $json[“classifica”][$i] [“stemma”], ‘</td>’ ;
echo ‘<td data-title=”SQUADRA”>’, $json[“classifica”][$i] [“nome”], ‘</td>’ ;
echo ‘<td data-title=”PT”>’, $json[“classifica”][$i] [“punti”], ‘</td>’;
echo ‘<td data-title=”G”>’, $json[“classifica”][$i] [“giocate”], ‘</td>’;
echo ‘<td data-title=”V”>’, $json[“classifica”][$i] [“vinte”], ‘</td>’;
echo ‘<td data-title=”N”>’, $json[“classifica”][$i] [“pareggiate”], ‘</td>’;
echo ‘<td data-title=”P”>’, $json[“classifica”][$i] [“perse”], ‘</td>’;
echo ‘<td data-title=”GF”>’, $json[“classifica”][$i] [“gol_f”], ‘</td>’;
echo ‘<td data-title=”GS”>’, $json[“classifica”][$i] [“gol_s”], ‘</td>’;
echo ‘<td data-title=”D”>’, $json[“classifica”][$i] [“differenza”], ‘</td>’;
echo ‘</tr>’;
//echo $i, $n;
//echo $json[$i]->cognome , ‘ ‘, $json[$i]->nome , $json[$i]->ruolo ,$json[$i]->squadra ,'<br>’;
}
?>
</tbody>
</table>
</div>
</div>
[/source]