title: Using php in html to display images from within a folder
body: <p>I'm trying to use this so I can list all the pictures in a folder I have and then later use some CSS to make it look nice but this keeps showing </p>
  
  <blockquote>
    <p>'; } } ?></p>
  </blockquote>
  
  <p>where the image should be</p>
  
  <pre><code>&lt;body&gt;
  &lt;h1&gt;Laughing out loud&lt;/h1&gt;
  &lt;?php
  $handle = opendir(dirname(realpath(__FILE__)).'/images/');
  while($file = readdir($handle)){
      if($file !== '.' &amp;&amp; $file !== '..'){
           echo '&lt;img src="images/'.$file.'" border="0" /&gt;';
      }
  }
  ?&gt;
  &lt;p&gt;To&lt;/p&gt;
  &lt;/body&gt;
  </code></pre>