Creating a list of links
<p>I want to create a PHP file that checks the current directory for any files ending in .jpg, and then I want to generate a page of links to all of those files.</p>

<pre><code>&lt;?php 
$files = glob("./*.jpg");
if ($files) {
foreach ($files as $file) {
?&gt;
 &lt;a href=&lt;?php echo $file;?&gt;"&gt;&lt;/a&gt;
&lt;?php }
?&gt;
</code></pre>

<p>This is what I have, and it doesn't do anything, and I'm not quite sure why. I'm quite new to learning php, so I'm not fantastic at it at this point.</p>
