title: Generating 5x5 matrix with random numbers in each box
body: <p>I need to generate in PHP a matrix(5x5) in which, every box must contain different random number between 1 and 1000. I have tried like that but it generates me only 1 random number in every single box: </p>
  
  <pre><code>$random = rand(1, 1000);
  echo '&lt;table border="1" style="width:200px"&gt;';
      for ($i=0; $i &lt; 5; $i++) {      
          echo "&lt;tr&gt;";
              for ($j=0; $j &lt; 5; $j++) { 
                  echo "&lt;td&gt;";                
                      echo $random;
                  echo "&lt;/td&gt;";
                  }
          echo "&lt;/tr&gt;";
      }
  echo "&lt;/table&gt;";
  </code></pre>