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 7790151
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T21:30:04+00:00 2026-06-01T21:30:04+00:00

I have very long multidimensional array that have many sub arrays. I would like

  • 0

I have very long multidimensional array that have many sub arrays. I would like to insert some value from them into mysql. I would be gratefull for some tip how to deal with it. I would like to use a loop that put only some value to one or different table in database. How I can get value from for example [Things][Thing][k][value]? Thanks for any advice.

Array
(
[Data] => Array
    (
        [A] => Array
            (
                [B] => Array
                    (
                        [0] => Array
                            (
                                [C] => Array
                                    (
                                        [value] => some value1
                                    )
                                [D] => Array
                                    (
                                        [value] => some value2
                                    )
                                [E] => some value3
                            )
                        [1] => Array
                            (
                                [C] => Array
                                    (
                                        [value] => some value4
                                    )
                                [D] => Array
                                    (
                                        [value] => some value5
                                    )
                                [E] => 5
                            )
                    )
                [value] => 
            )
[Things] => Array
            (
                [Thing] => Array
                    (
                        [F] => Array
                            (
                                [value] => some value6
                            )
                        [G] => Array
                            (
                                [H] => Array
                                    (
                                        [0] => Array
                                            (
                                                [i] => Array
                                                    (
                                                        [value] => some value7
                                                    )
                                                [j] => Array
                                                    (
                                                        [value] => some value8
                                                        [value] => some value8
                                                    )
                                                [k] => Array
                                                    (
                                                        [value] => some value9
                                                    )
                                                [l] => Array
                                                    (
                                                        [value] => some value10
                                                    )
                                                [m] => some value11
                                                [n] => 
                                            )
                                        [1] => Array
                                            (
                                                [o] => Array
                                                    (
                                                        [value] => some value12
                                                    )
                                                [p] => Array
                                                    (
                                                        [value] => some value13
                                                    )
                                                [r] => Array
                                                    (
                                                        [value] => some value14
                                                    )
                                                [d] => Array
                                                    (
                                                        [value] => some value15
                                                    )
                                                [t] => some value16
                                                [u] => 
                                            )
                                    )
                                [value] => 
                            )
                            )
                            )           
                    [Thing2] => Array       
                    (

                            (...)

                            and so on...

In my database I have table for these things from array above. There is id in it of course and some other fields that are connected with other tables.
As you can see below I would like to get some values from array, insert it into Table Thing, and some of them put into
Table for field 4 and Table for field 5 and get id of them and put it into Table Thing. I’ll use stored procedure.
I would like to call it from php (I hope that this conception is good?). I have problem to get values that I want to get from this array so David Chan I’m looking for help with array and loop. I tried as Starx has written but I got nothing (white screen). I’m still learning so I know that I have to do something wrong.

............          .................       ..................
Table Thing           Table for field 4       Table for field 5

id int                id int                  id int
field 1 varchar       value varchar           value varchar
field 2 varchar
field 3 varchar       ................        ................
field 4 int
field 5 int
(...)
...........
  • 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-01T21:30:06+00:00Added an answer on June 1, 2026 at 9:30 pm

    Whenever you are trying to access multidimensional array, you have to use indices to point a particular field.

    For example:

    $data['A']['B'][0]['C']['VALUE'] would give you the value some value1

    Use a similar way to get the values and insert into the database.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have very long integer sequences that look like this (arbitrary length!): 0000000001110002220033333 Now
I have some very long draggable elements that I can drop in all cells
i have a very long hex string in a byte array and I would
In my program i have some very long task, which should be interruptable from
I have a very long line, where I would like to find all the
I have a very long horizontal form that is separated into multiple sub-forms, acting
I have a very long loop, and I would like to check the status
I have very long string returned from os:cmd. My exe-file output contains some symbols
I have a very long price file from my wholesaler that I have som
I have a very long javascript (so long that it's too long to escape

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.