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
<?php
$dir=opendir('.') or die ('Cannot open directory');
$file=readdir($dir);
for($j=1; $j < 13; $j++) :
print '<div style="float:left; width:100px">';
if(preg_match("/php$/", $file)){
include($file);
}
print '</div>';
if($j%6==0) print '<div style="clear:both;></div>';
endfor;
?>
thanks in advance for anyhelp
You can use
scandir();here is the code:
Let me know if you still have confusion