I have an array, which started off as an empty array with
$filearray = array(array(array()));
I know how to do it if there were tag IDs set, but I seem to be struggling where I've built on it.
while (($file = readdir($dir)) !== false)
{
//echo $file ;
//gets the file date, string needed decoding otherwise throws error. Thanks to stackoverflow!
$date = @filemtime($file);
$date = date("F d Y H:i:s.", filemtime(utf8_decode("/home/a1742406/public_html/files/$file")));
//echo $date. "<br />";
$size = filesize("/home/a1742406/public_html/files/$file") . ' bytes';
$filearray = array($file, $date, $size);
print "<pre>";
$data = implode(" ", $filearray);
echo $data;
//print_r($filearray);
print "</pre>";
}
My filearray has 3 parts, file, date and size, but I want to print them separately so i can have spacing between them and put them into a table or list, but I can't seem to figure how to separate them to do it, as the above prints it all in one row. Any help would be greatly appreciated to point me in the right direction!
Thanks.