Display only directories names in one directory
<p>I need display names directories in one directory. In dir I have directories and files, I need display directories only.</p>

<p>My code:</p>

<pre><code>&lt;?php
$szablony = opendir('libs');

while($katalog = $szablony -&gt;read()){
    if(!is_dir($katalog))
    echo $katalog;
}

$szablony-&gt;close();
?&gt;
</code></pre>

<p>This code display all: files and directories. I tried use is_dir() function but this fuction return only directories:</p>

<pre><code>.
..
</code></pre>
