Hello, i'm sitting here and playing and trying to make a "pool" to a website in php.
What I'm going is to show the contents of a folder using php. So far I have managed to list all files in selected folder using:

PHP Code: 
<?php
 
if ($handle opendir('.')) {
   while (
false !== ($file readdir($handle)))
      {
          if (
$file != "." && $file != "..")
      {
              
$thelist .= '<a href="'.$file.'">&laquo;'.$file.'&raquo;  <br></a>';
          }
       }
  
closedir($handle);
  }
?>
It is so far a list good enough for my purposes, except for one thing. I want to hide files with specifix extensions, specifically *. php.
I'm struggling to really figure this out, because I am completely blank on the field....
Daniel Reviewed by Daniel on . php: Hide *. php from the listing of files. Hello, i'm sitting here and playing and trying to make a "pool" to a website in php. What I'm going is to show the contents of a folder using php. So far I have managed to list all files in selected folder using: <?php if ($handle = opendir('.')) { while (false !== ($file = readdir($handle))) { if ($file != "." && $file != "..") { $thelist .= '<a href="'.$file.'">&laquo;'.$file.'&raquo; <br></a>'; Rating: 5