1 2 3 4
8 7 6 5
9 10 11 12
16 15 14 13
<?php
$v = 0;
$i = 1;
$s = 4;
for ($m=0; $m < $s; $m++) {
for ($h=1; $h <= $s; $h++) {
$v = $v+$i;
echo $v;
}
echo "<br>";
$v = $v+$s+$i;
$i = - $i;
}
?>
1 2 3 4
8 7 6 5
9 10 11 12
16 15 14 13
<?php
$v = 0;
$i = 1;
$s = 4;
for ($m=0; $m < $s; $m++) {
for ($h=1; $h <= $s; $h++) {
$v = $v+$i;
echo $v;
}
echo "<br>";
$v = $v+$s+$i;
$i = - $i;
}
?>
0Comments
Thanks you for commenting your questions. I will see question and respond you.