<?php
if (!function_exists('file_multi_upload')) {
	
	function file_multi_upload($fieldName, $path){
		$ci = &get_instance();
        $ci->load->library('upload');
        $config = array(// takes an array of initialization options
            "upload_path" => $path,
            "overwrite" => FALSE,
            "allowed_types" => "gif|jpg|png"
        );
        $ci->upload->initialize($config);
		$ci->upload->do_multi_upload($fieldName); // use same as you did in the input field
		$result = $ci->upload->get_multi_upload_data();
		
        if(empty($result))
            return FALSE;
        
        return $result;
	}
}