PHP include a php file in a div box whenever one generated
<p>I want to include a php file in a div box whenever one generated through a form.php file
I have here some code allready given 12 boxes in two rows, what i want is growing every time one box and include a new generated php file into new generated div box automaticly, here is my code which need to be improved and to be repaired</p>

<pre><code>&lt;?php
$dir=opendir('.') or die ('Cannot open directory');
$file=readdir($dir);
for($j=1; $j &lt; 13; $j++) :
    print '&lt;div style="float:left; width:100px"&gt;';
    if(preg_match("/php$/", $file)){
            include($file);
    }
    print '&lt;/div&gt;';
    if($j%6==0) print '&lt;div style="clear:both;&gt;&lt;/div&gt;';
endfor; 
?&gt;
</code></pre>

<p>thanks in advance for anyhelp</p>
