Directory listing using PHP
<pre><code>&lt;?php

function directory_listing($directory_name)
{
    if ($handle = opendir($directory_name)) 
    {
        while (false !== ($entry = readdir($handle))) 
        {
            if ($entry != "." &amp;&amp; $entry != "..") 
            {
                if(is_dir($entry))
                {   

                    **//program is avoiding this block
                    echo $entry.'--&lt;br/&gt;';** 

                }
                else
                {
                    echo $entry.'&lt;br/&gt;';
                }   
            }
        }
        closedir($handle);
    }
}


directory_listing('go');

?&gt;
</code></pre>

<p>I would like to have a directory listing with the above code. But the program is avoiding the mentioned <strong>if block</strong>. </p>

<p>Thanks</p>

<p>Foysal </p>
