title: How do I generate a list of random strings and hashes and output it in an HTML table?
body: <p>I'm trying to generate a list of, let's say 10, random strings and it's SHA-256 hash in an HTML table. </p>
  
  <p>I have found the following code submitted by another user to generate the random string:</p>
  
  <pre><code>function generateRandomString($length = 10) {
  $characters = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ';
  $charactersLength = strlen($characters);
  $randomString = '';
  for ($i = 0; $i &lt; $length; $i++) {
      $randomString .= $characters[rand(0, $charactersLength - 1)];
  }
  return $randomString;
  }
  </code></pre>
  
  <p>How do I loop the function and how do I output the string and the hash of the string in an HTML table?</p>