matrix print in php ... 4th matrix .... 5th matrix 6th matix

technical talkiess
0

 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;

}

?>


Post a Comment

0Comments

Thanks you for commenting your questions. I will see question and respond you.

Post a Comment (0)