A minor issue while iteration of array in php.Guidance please
<p>I have several files in a directory.I want to display all those filenames with the extension .txt and .jpeg</p>

<pre><code>&lt;?php
if ($handle = opendir("/home/work/collections/utils/")) {

    while (false !== ($file = readdir($handle))) {
        if ($file == '.' || $file == '..') {
            continue;
        }
        $actual_file=pathinfo("/etrade/home/collections/utils");
        if (($actual_file["extension"]== "txt") || 
            ($actual_file["extension"]== "jpg") ||      
            ($actual_file["extension"]== "pdf")) {
            //Require changes here.Dont know how to iterate and get the list of files 
            echo "&lt;td&gt;"."\n"." $actual_file['basename']."&lt;/a&gt;&lt;/td&gt;";         
        }
    }

    closedir($handle);
}
</code></pre>

<p>Please help me on how to iterate and get the list of files .For instance I want all files with jpg extension in a seperate column and pdf files in a seperate column(since I am going to display in a table)</p>
