Forum Moderators: coopster
<?php
$result = scandir(".");
print_r($result); ?> The above code of course shows the five files. I want to do them in a three column table. I thought I had it, but the code below simply creates a table with infinite rows.
<html>
<body>
<table border="1" width="100%">
<tbody>
<?php
while ($result = scandir(".")) {
echo "<tr><td> ".$result{'Array'}."</td>
<td>".$result{'Array'}."</td>
<td>".$result{'Array'}."</td></tr>";
}
?>
</tbody></table>
</body></html>
<?php
while ($result = scandir(".")) {
echo "<tr><td> ".$result."</td>
<td>".$result."</td>
<td>".$result."</td></tr>";
}
?>
Thanks.