title: I am looking for some suggestions/tricks/help solving this PHP exercise
body: <p>I am trying to get a list of string,ints from an input form with numOfString to generate, minStringLength(1) and maxStringLength(100). Just starting off with PHP and I cannot get it to work. Any help or suggestions? I have tried several ways and following is one of them.</p>
  
  <pre><code>&lt;?php
      //variables
      $reqString = $_POST['reqString'];
      $minString = $_POST['minString'];
      $maxString = $_POST['maxString'];
      function generateRandomString($minString, $maxString) {
          $strings = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ';
          // $stringRequested = reqString;
          // $stringMinLength = minString;
          // $stringMaxLength = maxString;
          $randomString = '';
          for ($i = 0; $i &lt; $_POST['reqString']; $i++) {
              $randomString = $strings[rand($minString, $maxString)];
          }
          return $randomString; 
          array($randomString);
      }
      echo generateRandomString($minString, $maxString);
      //printf($randomString);
  
      //something I found online
      // $n=range(11,20);
      // shuffle($n);
      // for ($x=0; $x&lt; 10; $x++)
      // {
      // echo $n[$x].' ';
      // }
      // echo "\n"
  
  
  
          //variables
      //$reqInteger = $_POST['reqInteger'];
      //$minInteger = $_POST['minInteger'];
      //$maxInteger = $_POST['maxInteger'];
      // function generateRandomInteger($reqInteger, $minInteger, $maxInteger) {
      // $integers = '0123456789';
      // $integerRequested = reqInteger;
      // $integerMinLength = minInteger;
      // $integerMaxLength = maxInteger;
      // $randomInteger = '';
      //   for ($i = 0; $i &lt; $integerRequested; $i++) {
      //     $randomInteger .= $integers[mt_rand($integerMinLength, $integerMaxLength)];
      //   }
      // return $randomInteger;
      // }
      // echo generateRandomInteger($reqInteger, $minInteger, $maxInteger);
      // echo $randomInteger;
  </code></pre>