I am trying to get all files in a folder. The files are images along with one extra file named as "Thumbs.db"
fOLLowing is my code
$path = $ringPaths[$i];
        $dirname =   substr( $path ,0, -4 );
        $lastpart = basename( $dirname , ".zip");
        $abspath = substr( $dirname ,strpos( $dirname, "com/")+4 );
        $direcotypath = "../".$abspath."/".$lastpart;
        $files = glob($direcotypath."/*.*");
        foreach ($files as $key => &$value) 
        {
                $value = str_replace( "..", $url, $value);
            }
            $final = array_merge($final,$files);
I have tried removing Thumbs.db using following code
foreach ($final as $key => &$value) 
    {     
              if($value == "Thumbs.db")
              {
                unset($final[$key]); 
              }
        }
Anyone know what is wrong with above code? I am still in learning process
 
    