Please see the given script for multiple file upload with error of undefined offset : 4 in your row
for($i=0; $i<=count($_FILES['pics']); $i++) {
    $tmpFilePath = $_FILES['pics']['tmp_name'][$i]; // this row error
    $extract=explode(".",$_FILES["pics"]["name"][$i]);
    $exten=$extract[1];
    $completes=str_shuffle(str_replace(" ","",$_POST["title"].$extract[0])).".".$exten;
    $images[]=$completes;
    $newFilePath = "data/product/" . $completes;
    move_uploaded_file($tmpFilePath, $newFilePath);
    $data = getimagesize($newFilePath);
    $width=$data[0];
    $height = $data[1];
    $newWidth= $width/$height*342;
    $image = new SimpleImage();
    $image->load($newFilePath);
    $image->resize($newWidth,342);
    $image->save("data/product/".$completes); 
}
$images=implode(",",$images);
 
     
    