I've been looking online for a way to reset the keys of sub arrays. Heres a portion of what I have:
Code: Select all
Array
(
[userfile] => Array
(
[name] => Array
(
[5] => IMG_20170325_152954871_HDR.jpg
)
[type] => Array
(
[5] => image/jpeg
)
[tmp_name] => Array
(
[5] => /Applications/XAMPP/xamppfiles/temp/phpA49huQ
)
)
)Code: Select all
$_FILES = array_map('array_values', $_FILES);
// And also tried...
foreach ($_FILES as &$val) {
$val = array_values($val);
Code: Select all
Array
(
[userfile] => Array
(
[0] => Array
(
[5] => IMG_20170325_152954871_HDR.jpg
)
[1] => Array
(
[5] => image/jpeg
)
[2] => Array
(
[5] => /Applications/XAMPP/xamppfiles/temp/phpA49huQ
)
)
)Code: Select all
Array
(
[userfile] => Array
(
[name] => Array
(
[0] => IMG_20170325_152954871_HDR.jpg
)
[type] => Array
(
[0] => image/jpeg
)
[tmp_name] => Array
(
[0] => /Applications/XAMPP/xamppfiles/temp/phpA49huQ
)
)
)Cheers,
Rick