note 109437 added to features.file-upload.multiple
| From: | molnar at mediacube dot sk | Date: | Tue, 17 Jul 2012 12:32:18 +0000 |
| Subject: | note 109437 added to features.file-upload.multiple | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-189257@lists.php.net to get a copy of this message | ||
I'am using this to normalize $_FILES array. It's short and clean, normalizes fields with
single upload or multiupload. It uses explicit array typecast:
function getNormalizedFILES()
{
$newfiles = array();
foreach($_FILES as $fieldname => $fieldvalue)
foreach($fieldvalue as $paramname => $paramvalue)
foreach((array)$paramvalue as $index => $value)
$newfiles[$fieldname][$index][$paramname] = $value;
return $newfiles;
}
----
Server IP: 69.147.83.197
Probable Submitter: 147.175.82.70
----
Manual Page -- http://www.php.net/manual/en/features.file-upload.multiple.php
Edit -- https://master.php.net/note/edit/109437
Del: integrated -- https://master.php.net/note/delete/109437/integrated
Del: useless -- https://master.php.net/note/delete/109437/useless
Del: bad code -- https://master.php.net/note/delete/109437/bad+code
Del: spam -- https://master.php.net/note/delete/109437/spam
Del: non-english -- https://master.php.net/note/delete/109437/non-english
Del: in docs -- https://master.php.net/note/delete/109437/in+docs
Del: other reasons-- https://master.php.net/note/delete/109437
Reject -- https://master.php.net/note/reject/109437
Search -- https://master.php.net/manage/user-notes.php