title: Display images from folder in table using php,html?
body: <p>I want to display my images in table form. Here is my code: </p>
  
  <pre><code>&lt;?php
  $files = glob("images/*.*");
  for ($i = 0; $i &lt; count($files); $i++) {
      $image = $files[$i];
      $supported_file = array(
          'gif',
          'jpg',
          'jpeg',
          'png'
      );
  
      $ext = strtolower(pathinfo($image, PATHINFO_EXTENSION));
      if (in_array($ext, $supported_file)) {
          echo basename($image);
  echo '&lt;img src="' . $image . '" alt="Random image" ,width=100px, height=100px /&gt;&lt;br&gt;';
  } else {
  continue;
  }
  }
  ?&gt;
  </code></pre>
  
  <p><a href="https://i.stack.imgur.com/pzUCY.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/pzUCY.png" alt="enter image description here"></a></p>
  
  <p>Something like that picture. </p>