Advertisement
rodro1

Multiple Array broke for image upload

Nov 5th, 2015
116
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.48 KB | None | 0 0
  1. if(isset($_POST["submit"])){
  2.         $power_array = array();
  3.         $file_count = count($_FILES["file"]["tmp_name"]);
  4.         $array_count = count($_FILES["file"]);
  5.         $base_file = $_FILES["file"];
  6.         $parent_array = array();
  7.  
  8.             print_r($base_file);
  9.         // die( );
  10.         for($i = 0; $i < $file_count; $i++){
  11.                 foreach ($base_file as $key => $value) {
  12.                     $power_array[$key] = $_FILES["file"][$key][$i];
  13.                 }
  14.                 $parent_array[] = $power_array;
  15.             }
  16.         print_r($parent_array);
  17.         die();
  18. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement