Form to search directory for .PHP files
<p>I currently have this script that automatically searches my directory and displays the results in iframes within a div:</p>

<pre><code>&lt;?php
$iterator = new RecursiveDirectoryIterator('work/');

foreach(new RecursiveIteratorIterator($iterator) as $filename =&gt; $cur) {
    $file_info = pathinfo($filename);   
    if($file_info['extension'] === 'php') { 
        echo "&lt;iframe width=420 height=150 frameborder=0 src='$filename'&gt;&lt;/iframe&gt;";
    }
}
?&gt;
</code></pre>

<p>This works a treat, however if I want the user to actually use a 'search form' to search the directory for php files via key-words and display them in the same manner, how would I do that?</p>

<p>Thanks in advance for your help.</p>
