rendered paste bodyforeach ($test as $value) { echo "<br><br><b>MP3 found => \n $value</b>"; // $i=$i+1;// echo "<br> \n $i"; if(strstr($value,"ogg")) { echo "OGG FOUND"; echo "<br>$value \n is ogg"; $test=oggdata($value); echo "<br><br><br><br>";$title=$test['Title'];$artist=$test[Artist];$album=$test[Album];$year=$test[Date];$comment=$test[Comment];$track=$test[Tracknumber];$genre=$test[Genre]; echo "...::::: : File : $value :::::...<br>"; echo "...::::: : : ----------------------------------<br>"; echo "...::::: : : Header : :::::...<br>"; echo "...::::: : : Title : $title :::::...<br>"; echo "...::::: : : Artist : $artist:::::...<br>"; echo "...::::: : : Album : $album :::::...<br>"; echo "...::::: : : Year : $year :::::...<br>"; echo "...::::: : : Comment :$comment :::::...<br>"; echo "...::::: : : Track : $track :::::...<br>"; echo "...::::: : : Genre : $genre :::::...<br>"; echo "...::::: : : ----------------------------------"; addSong(ogg); print_r($test); }elseif(strstr($value,"mp3")) { echo "<br>mp3 yes yes yes u know it"; if($ID3->readtag($value) == true) //{ $testing=str_replace(chr(0),"",$ID3->album); echo "<br>testing is EQUAL TO \n $testing"; // $ID3->title=mysql_real_escape_string($ID3->title); echo "...::::: : File : $mp3_file :::::...<br>"; echo "...::::: : : ----------------------------------<br>"; echo "...::::: : : ID3v1 : $ID3->tag :::::...<br>"; echo "...::::: : : Title : $ID3->title :::::...<br>"; echo "...::::: : : Artist : $ID3->artist:::::...<br>"; echo "...::::: : : Album : $ID3->album :::::...<br>"; echo "...::::: : : Year : $ID3->year :::::...<br>"; echo "...::::: : : Comment : $ID3->comm :::::...<br>"; echo "...::::: : : Track : $ID3->track :::::...<br>"; echo "...::::: : : Genre : $ID3->genre :::::...<br>"; echo "...::::: : : ----------------------------------"; $path=$value; // echo "<br>path is \n $path"; $path=str_replace("/opt/lampp/htdocs/","/../../../",$value); // $ID3->album=mysql_real_escape_string($ID3->album); //$ID3->album=addslashes($ID3->album); //$ID3->title=addslashes($ID3->tibtle); //$ID3->artist=addslashes($ID3->artist); //$ID3->comm=addslashes($ID3->comm); addSong("mp3"); // echo "<br> new path is \n $path"; }}