note 116183 added to features.file-upload.multiple

From: Date: Wed, 19 Nov 2014 15:31:06 +0000
Subject: note 116183 added to features.file-upload.multiple
Groups: php.notes 
Request: Send a blank email to php-notes+get-200953@lists.php.net to get a copy of this message
My code to make multiple file upload into, nice looking array: RESULT: Array ( [0] => Array ( [name] => Promo.jpg [type] => image/jpeg [tmp_name] => D:\xampp\tmp\phpDC9D.tmp [error] => 0 [size] => 67468 ) [1] => Array ( [name] => v-gold-grey-pink.jpg [type] => image/jpeg [tmp_name] => D:\xampp\tmp\phpDC9E.tmp [error] => 0 [size] => 32288 ) ) CODE: <?php if(isset($_FILES['images'])) { $images = $_FILES['images']; $results = array(); $counter = 0; $file_count = count($images['name']); while($counter < $file_count) { $results[$counter]['name'] = $images['name'][$counter]; $results[$counter]['type'] = $images['type'][$counter]; $results[$counter]['tmp_name'] = $images['tmp_name'][$counter]; $results[$counter]['error'] = $images['error'][$counter]; $results[$counter]['size'] = $images['size'][$counter]; $counter++; } } echo '<pre>'; print_r($results); echo '</pre>'; ?> ---- Server IP: 72.52.91.14 Probable Submitter: 46.214.159.30 ---- Manual Page -- http://php.net/manual/en/features.file-upload.multiple.php Edit -- https://master.php.net/note/edit/116183 Del: integrated -- https://master.php.net/note/delete/116183/integrated Del: useless -- https://master.php.net/note/delete/116183/useless Del: bad code -- https://master.php.net/note/delete/116183/bad+code Del: spam -- https://master.php.net/note/delete/116183/spam Del: non-english -- https://master.php.net/note/delete/116183/non-english Del: in docs -- https://master.php.net/note/delete/116183/in+docs Del: other reasons-- https://master.php.net/note/delete/116183 Reject -- https://master.php.net/note/reject/116183 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#200953) next »