note 105143 added to features.file-upload.post-method
| From: | Anonymous at osu1 dot php dot net | Date: | Fri, 29 Jul 2011 23:32:05 +0000 |
| Subject: | note 105143 added to features.file-upload.post-method | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-182011@lists.php.net to get a copy of this message | ||
Function to flatten the _FILES array into the format mentioned in an earlier post. The group name
is for when an array of files are upload, 'photos[]' for example.
function _flatten_files_array($group_name)
{
if(empty($_FILES[$group_name]))
{
return array();
}
$new_files_array = array();
foreach($_FILES[$group_name] as $key => $attr)
{
foreach($attr as $index => $val)
{
if(!is_array($new_files_array[$index]))
{
$new_files_array[$index] = array();
}
$new_files_array[$index][$key] = $val;
}
}
return $new_files_array;
}
----
Server IP: 69.147.83.197
Probable Submitter: 50.0.140.56
----
Manual Page -- http://www.php.net/manual/en/features.file-upload.post-method.php
Edit -- https://master.php.net/note/edit/105143
Del: integrated -- https://master.php.net/note/delete/105143/integrated
Del: useless -- https://master.php.net/note/delete/105143/useless
Del: bad code -- https://master.php.net/note/delete/105143/bad+code
Del: spam -- https://master.php.net/note/delete/105143/spam
Del: non-english -- https://master.php.net/note/delete/105143/non-english
Del: in docs -- https://master.php.net/note/delete/105143/in+docs
Del: other reasons-- https://master.php.net/note/delete/105143
Reject -- https://master.php.net/note/reject/105143
Search -- https://master.php.net/manage/user-notes.php