for($i = 0, $l = count($remove_imgs); $i < $l; $i++){
$remove_imgs[$i] = '\'' . $remove_imgs[$i] . '\'';
}
$string_remove_imgs = implode(',', $remove_imgs);
$query = "DELETE FROM images WHERE id_news='$id_news' AND im_path IN ($string_remove_imgs)";