title: How do I make a PHP file work inside an HTML with Bluehost
body: <p>So I am trying to make a PHP file look through my database, find all of my images, and print them, I have watched a few people do this to make sure I got the code right since I am a little new to PHP. the code is</p>
  <pre><code>&lt;?php
  $dir_path    = 'Albums/portaits';
  $ext_array = array('jpg', 'png', 'jpeg');
  
  if(is_dir($dir_path))
  {
      $files = scandir($dir_path);
      
      for($i = 0; $i &lt; count($files); $i++)
      {
          if($files[$i] !='.' &amp;&amp; $files[$i] !='..')
          {
              //get file name
              echo &quot;File Name -&gt; $files[$i]&lt;br&gt;&quot;;
              
              //get file ext
              $file = pathinfo($files[$i]);
              $extension = $file['extension'];
              echo &quot;File Extension-&gt; $extension&lt;br&gt;&quot;;
              echo &quot;img src='$dir_path$files[$i]'&gt;&quot;;
          }
      }
  } ?&gt;`
  </code></pre>
  <p>I have no idea how to input or call this in HTML and I am unable to do the same as the people in the video.</p>
  <p>I am sure that the images are on the server doing mysite.come/images. I see the directories and all on the site. My plan is to make a portfolio page, where I have a little drop-down (that's all css and I think I understand that much lol) and it displays the images of what the PHP calls. the idea is that I won't need to add 50 lines of <code>&lt;img&gt;</code> and I can add images by just uploading an updated folder</p>