$sql=mysql_query("SELECT * FROM xs_jg");
while ($d=mysql_fetch_array($sql)) {
$t[]=$d;
}
for ($i=0;$i<count($t);$i++) {
$a=1;
$b=2;
$num=15;
$id=$t[$i][id];
$jga=0;
$jga=0;
for ($o=$a;$o<=15;$o++) {
$v="${o}_$a";
$w="${o}_$b";
$jga+=$t[$i][$v];
$jgb+=$t[$i][$w];
}
echo "$id $jga $jgb<br>";
}
while ($d=mysql_fetch_array($sql)) {
$t[]=$d;
}
for ($i=0;$i<count($t);$i++) {
$a=1;
$b=2;
$num=15;
$id=$t[$i][id];
$jga=0;
$jga=0;
for ($o=$a;$o<=15;$o++) {
$v="${o}_$a";
$w="${o}_$b";
$jga+=$t[$i][$v];
$jgb+=$t[$i][$w];
}
echo "$id $jga $jgb<br>";
}
while ($d=mysql_fetch_array($sql)) {
$t[]=$d;
}
for ($i=0;$i<count($t);$i++) {
$a=1;
$b=2;
$num=15;
$id=$t[$i][id];
$jga=0;
$jgb=0;
for ($o=$a;$o<=15;$o++) {
$v="${o}_$a";
$w="${o}_$b";
$jga+=$t[$i][$v];
$jgb+=$t[$i][$w];
}
echo "$id $jga $jgb<br>";
}