note 106558 added to reserved.variables.files

From: Date: Fri, 18 Nov 2011 12:39:53 +0000
Subject: note 106558 added to reserved.variables.files
Groups: php.notes 
Request: Send a blank email to php-notes+get-184560@lists.php.net to get a copy of this message
For situation download[file1], download[file2], ..., download[fileN], try it: <?php /** * * @param array $arrayForFill * @param string $currentKey * @param mixed $currentMixedValue * @param string $fileDescriptionParam (name, type, tmp_name, error или size) * @return void */ function rRestructuringFilesArray(&$arrayForFill, $currentKey, $currentMixedValue, $fileDescriptionParam) { if (is_array($currentMixedValue)) { foreach ($currentMixedValue as $nameKey => $mixedValue) { rRestructuringFilesArray($arrayForFill[$currentKey], $nameKey, $mixedValue, $fileDescriptionParam); } } else { $arrayForFill[$currentKey][$fileDescriptionParam] = $currentMixedValue; } } $arrayForFill = array(); foreach ($_FILES as $firstNameKey => $arFileDescriptions) { foreach ($arFileDescriptions as $fileDescriptionParam => $mixedValue) { rRestructuringFilesArray($arrayForFill, $firstNameKey, $_FILES[$firstNameKey][$fileDescriptionParam], $fileDescriptionParam); } } $_FILES = $arrayForFill; ?> ---- Server IP: 92.48.119.85 Probable Submitter: 62.105.147.202 ---- Manual Page -- http://www.php.net/manual/en/reserved.variables.files.php Edit -- https://master.php.net/note/edit/106558 Del: integrated -- https://master.php.net/note/delete/106558/integrated Del: useless -- https://master.php.net/note/delete/106558/useless Del: bad code -- https://master.php.net/note/delete/106558/bad+code Del: spam -- https://master.php.net/note/delete/106558/spam Del: non-english -- https://master.php.net/note/delete/106558/non-english Del: in docs -- https://master.php.net/note/delete/106558/in+docs Del: other reasons-- https://master.php.net/note/delete/106558 Reject -- https://master.php.net/note/reject/106558 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#184560) next »