I have this two array. I want to make a array inside an array like this. How can I achieve that. Code posted below. This is the image I am sending inside fileToUpload. The array I have
Array
(
[fileToUpload] => Array
(
[name] => KERINOX COFFEE.jpg
[type] => image/jpeg
[tmp_name] => /opt/lampp/temp/phpuk5Uyo
[error] => 0
[size] => 2440617
)
)
The array I want
Array
(
[fileToUpload] => Array
(
[name] => Array
(
[0] => KERINOX COFFEE.jpg
)
[type] => Array
(
[0] => image/jpeg
)
[tmp_name] => Array
(
[0] => /opt/lampp/temp/php0LlvE2
)
[error] => Array
(
[0] => 0
)
[size] => Array
(
[0] => 2502103
)
)
)