I want to upload 1 specific index from an array of images from POST? From data below, let's say I only want to upload index 2.
// $_FILES['image']
Array
(
[name] => Array
(
[1] => 2b.png
[2] => 2c.png
)
[type] => Array
(
[1] => image/png
[2] => image/png
)
[tmp_name] => Array
(
[1] => C:\xampp\tmp\php247F.tmp
[2] => C:\xampp\tmp\php2480.tmp
)
[error] => Array
(
[1] => 0
[2] => 0
)
[size] => Array
(
[1] => 244274
[2] => 277569
)
)
So far I got:
if ($this->upload->do_upload('image[2]'))
...
But obviously it doesn't work that way. any idea how?
I have a bigger loop before the images and I only have to select 1 image per iteration. It will be a big overhead if I use another loop to select an image.