I had develop one module and it works currectly But When I have check Coding standard using phpcs it will provide me Error in php coding standard
--standard=MEQP2
Error is
i have get result of $_FILES in this format
Array
(
[dynamic_rows_container] => Array
(
[name] => Array
(
[0] => Array
(
[logo] => BACKGROUNDDEFAULT.jpg
)
)
[type] => Array
(
[0] => Array
(
[logo] => image/jpeg
)
)
[tmp_name] => Array
(
[0] => Array
(
[logo] => D:\xampp72\tmp\php1E43.tmp
)
)
[error] => Array
(
[0] => Array
(
[logo] => 0
)
)
[size] => Array
(
[0] => Array
(
[logo] => 120785
)
)
)
)
and I want in This
Array
(
[logo] => Array
(
[name] => BACKGROUNDDEFAULT.jpg
[type] => image/jpeg
[tmp_name] => D:\xampp72\tmp\phpD833.tmp
[error] => 0
[size] => 120785
)
)
and I have use this code to formate file array this is my code
foreach ($_FILES['dynamic_rows_container'] as $i => $item) {
foreach ($item as $key => $value) {
$file['logo'][$i] = $value['logo'];
}
}
$_FILES = $file;
If any one has solution then Provide me. thank u in advance.
$_FILES
– fmsthird Apr 24 '19 at 9:10