Hi I wanted to validate if the uploaded file is images by using the below script. However, I get a warning message saying that it required string and an array is given. How do I modify the script to validate multiple upload (I show 4 upload file with [] in the form). thanks.

PHP Code:
$imageinfo getimagesize($_FILES['userfile']['tmp_name']);
    if(
$imageinfo['mime'] != 'image/gif' && $imageinfo['mime'] != 'image/jpeg') {
    echo 
"Sorry, we only accept GIF and JPEG images\n";
    exit;