Jump to content

File Listing in one folder


The Sea King

Recommended Posts

I found this code on an php archive. I was wondering on how to remove the grouping of 10.

<?phpif ($handle = opendir('.')) {$count = 0;while (false !== ($file = readdir($handle))) {echo $count == 0 ? "<ol>" : "";echo "<li><a href='$file'>$file</a></li>";$count++;if($count == 10){echo "</ol>";$count = 0;}}echo $count != 10 ? "</ol>" : "";closedir($handle);} ?>

Link to comment
Share on other sites

<?php	if ($handle = opendir('.')) {		echo "<ol>";		while (false !== ($file = readdir($handle))) {			echo "<li><a href='$file'>$file</a></li>";		}		echo "</ol>";		closedir($handle);	}?>

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...