Validating uploaded images
There are 4 foreach loops for the same files, going for a little more complex but more
organaized nested loop would be better, like this

foreach ($_FILES['event-images']['tmp_name'] as $tmp_name) {
    if (!empty($tmp_name)){
        $image = $_FILES["event-images"]["name"];
        $path_info = pathinfo($image);
        if ($path_info['extension'] == 'jpg' || $path_info['extension'] == 'jpeg' || $path_info['extension'] == 'png' || $path_info['extension'] == 'gif'){
            if ($_FILES["image"]["size"] &lt;= $maxFileSize){
                $image_d = getimagesize($image);            
                if(($image_d[0] &gt;= $minWidth) &amp;&amp; ($image_d[1] &gt;= $minHeight)){
                    $errors[]="valid image";
                }else{
                    $errors[]="invalid dimension";
                }
            }else{
                $errors[]="invalid file size";
            }
        }else{
            $errors[]="format not supported";
        }

    }else{
        $errors[] = 'Please select at least one image.';
    }
}