The Sea King Posted March 8, 2008 Share Posted March 8, 2008 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 More sharing options...
Synook Posted March 8, 2008 Share Posted March 8, 2008 <?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 More sharing options...
The Sea King Posted March 8, 2008 Author Share Posted March 8, 2008 Thank you! I must learn more about php. . Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.