$file) { if($i>1) { // take "." and ".." off $info = pathinfo('dreamcakes/full/'.$file); if(($i-2)%4==0) { echo '
'; } echo '
'.$info["filename"].'
'; } } ?>