o zaman resim1[$i] ve resim2[$j] şeklinde diziye aktar while döngüsünde.
diziyle halledersin herhalde.