well, this isnt really a problem, more of a "its not advanced enough"
i have this code
<table width="100%" border="3">
<?php
$cols = array_chunk($files, 5); // 5 columns
foreach($cols as $col)
{
echo "<tr>";
foreach($col as $filename)
{
echo "<td>";
echo stristr($filename,".");
echo " <div align=\"center\">$filename</div>
</td>";
}
echo "</tr>\n";
}
?>
</table>
and it shows a table, good, it shows filenames and above the extensions BUT
there are some problems - first it shows the dot
eg:
.php
Second if a folder has a . in it it returns as a filename eg
folder.withdot
returns
.withdot
and third if there is two dots it returns this
.inc.php
im thinking i need a regex function, but i dont know of any, after 3hrs of googling i got stristr
but it comes up short when your dealing with filenames.....
also how do you determine if its a folder or file???
this data is coming from an ftp server, so how do i read the metadata
thats a lot of info so thanks