im trying to modify a php file to fit my needs. the file reads a directory and returns the id3 tag info from mp3 files.
ive almost got it but im stuck on these lines of code
i have these 2 lines inside the while function
if ($output) $output .= "|";
$output .= ($ThisFileInfo['comments_html']['title']);
then the last thing it does is....
echo "&files=$output&";
lets say it runs through the loop for the 4 mp3's in the directory.
with the code how it is i get this as ouput
&files=Array|Array|Array|Array&
if i remove the () i get page cannot be displayed
i have also tried putting the variable name inside "" and ''. both of which do not work.
here is the full code
$DirectoryToScan = '../'; // change to whatever directory you want to scan
$dir = opendir($DirectoryToScan);
while (($file = readdir($dir)) !== false) {
$FullFileName = realpath($DirectoryToScan.'/'.$file);
if (is_file($FullFileName)) {
set_time_limit(30);
$ThisFileInfo = $getID3->analyze($FullFileName);
getid3_lib::CopyTagsToComments($ThisFileInfo);
// output desired information in whatever format you want
if ($output) $output .= "|";
$output .= ($ThisFileInfo['comments_html']['title']);
}
}
echo "&files=$output&";
?>
</BODY>