Compare two directory and store the common images in another directory

Viewed 44
$result2 = array_intersect($test,$Masterjpg) ;
$path ='C:\kgl\Master Row';

foreach($test as $d1){
    $match =false;
    // echo $d1.'<br>';
    foreach($Masterjpg as $d2){
        // echo $d2.'<br>';
        $match=true;
        if($d1===$d2){  
            opendir($path);
            file_put_contents($path,$result2);
            echo "moved successfully...<br><br>";
        }else{
            echo "moved not successfully...<br>";
        }
           
    }

}
0 Answers
Related