I have a database containing images for product. I'm displaying images from the database by this.
$sql="select imagename from table where item_id='$id'";
Then i select all the names and select all the images from the images folder. But there are some duplicate images in the folder. I cant remove them manually as there are thousands of images. I have a script that compares two images and tells whether they are same or not. But how do i compare all images and select only the ones that are not identical Example: The compare script works like this!
$a-image1.jpg;
$b=image2.jpg;
$sameimage=$samecheck->compare($a,$b);