Check if two arrays are equal

 $v) {
        foreach ($arrayb as $k2 => $v2) {
            if($v == $v2) {             
                unset($array[$k],$arrayb[$k2]); // removed matched items 
            }
        }
    }
}

compare($array,$arrayb);

// delete all
print_r($array);

echo '============';

// insert all 
print_r($arrayb);

I hope you like this Post, Please feel free to comment below, your suggestion and problems if you face - we are here to solve your problems.

DMCA.com Protection Status