[eluser]nirbhab[/eluser]
dude as far as my understanding is concerned $key is an Array().
Code:
if( ! empty($key['name']))
check this piece of code.
This is Array() for sure.
Please check the CI User Guide, there is a function do_upload().
Call this function in for loop for multiple uploading.
Code:
$config['upload_path'] = './uploads/';
$config['allowed_types'] = 'gif|jpg|png';
$config['max_size'] = '100';
$config['max_width'] = '1024';
$config['max_height'] = '768';
$this->load->library('upload', $config);
Don't use this piece of code again and again, as this one is loading the upload library.
Load upload library once with its configurations.