samedi 7 mai 2016

PHP get min and max values from 50 random numbers?

<?php
 echo "<table border='1'><br />";
  for ($row = 0; $row < 10; $row ++) {
   echo "<tr>";
   for ($col = 0; $col < 5; $col ++) {
   $rand = rand (1, 200);
     echo "<td>", $rand, "</td>";
    }
    echo "</tr>";
   }
  echo "</table>";
?>

Here is code but my question is how can I find max and min from values of the table? Do I have to make random numbers somehow into array?




Aucun commentaire:

Enregistrer un commentaire