PHP - Count files
<p>I'm trying to count all files within a folder. This is the code I'm using:</p>

<pre><code>&lt;?php  
$dir = new DirectoryIterator("myfolder/mysubdolder");
foreach($dir as $file ){ $x += (isImage($file)) ? 1 : 0;}
?&gt; 
</code></pre>

<p>It returns this error:</p>

<blockquote>
  <p>Fatal error: Call to undefined function isImage() in C:...</p>
</blockquote>

<p>What's wroing with my code?
Thanks
Uli </p>
