Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9221369
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T03:33:54+00:00 2026-06-18T03:33:54+00:00

Array ( [1] => Array ( [0] => purple.txt [1] => pinky.txt [2] =>

  • 0
Array
(
[1] => Array
    (
        [0] => purple.txt
        [1] => pinky.txt
        [2] => original stuff.txt
    )

[2] => Array
    (
        [0] => purp1.txt
        [1] => pink1.txt
        [2] => original stuff1.txt
        [3] => increment1.txt
    )

)
Array
(
[1] => Array
    (
        [0] => C:\wamp\tmp\php6395.tmp
        [1] => C:\wamp\tmp\php63A6.tmp
        [2] => C:\wamp\tmp\php63A7.tmp
    )

[2] => Array
    (
        [0] => C:\wamp\tmp\php63A8.tmp
        [1] => C:\wamp\tmp\php63A9.tmp
        [2] => C:\wamp\tmp\php63AA.tmp
        [3] => C:\wamp\tmp\php63AB.tmp
    )

I would like to match the array keys with the proper array keys from the second array for example I would like to be able get the file name

each

[1] => Array
[2] => Array

is a new row and I would like to eventually save all the file names from that row in mysql so i can call the links….

[1] => Array
    (
        [0] => purple.txt

and match it with

[1] => Array
    (
        [0] => C:\wamp\tmp\php6395.tmp

so I can use them together for file storage and so on……

The following php is

if(isset($_FILES['file'])=== true){
$files = $_FILES['file']['name'];
$files_tmp = $_FILES['file']['tmp_name'];

echo '<pre>';
print_r ($files);
echo '<pre>';

echo '<pre>';
print_r ($files_tmp);
echo '<pre>';
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-18T03:33:55+00:00Added an answer on June 18, 2026 at 3:33 am

    This is how you would iterate over multiple uploaded files. Assuming you have these input element names:

    file[0][0]
    file[0][1]
    file[1][0]
    ...
    
    foreach ($_FILES['file']['name'] as $row => $rowfiles) {
        foreach ($rowfiles as $index => $name) {
            $tmp_name = $_FILES['file']['tmp_name'][$row][$index];
    
            // do stuff with $name and $tmp_name
        }
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

A one-element JSON array that I'm trying to unmarshal: [ { id:42, status:Active, name:purple
I have two arrays : array(blue, yellow) and array(blue, green, red, purple) . Is
array(2) { [0]=> array(4) { [id]=> string(1) 1 [name]=> string(3) Lim [subproject_id]=> string(1) 5
Array ( [0] => Array ( [name] => A [id] => 1 [phone] =>
Array.Copy and Buffer.BlockCopy both do the same thing, but BlockCopy is aimed at fast
Array ( [4] => stdClass Object ( [vid] => 4 [name] => Movie [description]
Array ( [status] => success [stories] => Array ( [0] => Array ( [name]
Array ( [0] => Array ( [datas] => Array ( [name] => lorem [id]
Array starts like this: Array ( [SMART Board] => Array ( [0] => sb1
Array ( [0] => Array ( [SubID] => 19 [0] => 19 [RandomCode] =>

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.