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

  • SEARCH
  • Home
  • 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 9258317
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T12:22:10+00:00 2026-06-18T12:22:10+00:00

Initial Array: Array ( [0] => Array ( [0] => Kate [1] => Array

  • 0

Initial Array:

Array 
( 
    [0] => Array ( 
        [0] => "Kate" 
        [1] => Array ( [0] => 1 [1] => 30 [2] => 11 ) 
        [2] => "Seattle" 
    ) 
    [1] => Array ( 
        [0] => "Kate" 
        [1] => Array ( [0] => 100 [1] => 7 [2] => 55 ) 
        [2] => "Seattle" 
    ) 
    [2] => Array ( 
        [0] => "Mike" 
        [1] => Array ( [0] => 1 [1] => 2 [2] => 13 ) 
        [2] => "New York" 
    ) 
    [3] => Array ( 
        [0] => "Paul" 
        [1] => Array ( [0] => 5 [1] => 34 [2] => 9 ) 
        [2] => "Chicago" 
    ) 
    [4] => Array ( 
        [0] => "Mike" 
        [1] => Array ( [0] => 1 [1] => 30 [2] => 13 ) 
        [2] => "New York" 
    ) 
) 

Desired Output:

Array 
( 
    [0] => Array ( 
        [0] => "Kate" 
        [1] => Array ( [0] => 1 [1] => 30 [2] => 11 [3] => 100 [4] => 7 [5] => 55 ) 
        [2] => "Seattle" 
    ) 
    [1] => Array ( 
        [0] => "Mike" 
        [1] => Array ( [0] => 1 [1] => 2 [2] => 13 [3] => 30 ) 
        [2] => "New York" 
    ) 
    [2] => Array ( 
        [0] => "Paul" 
        [1] => Array ( [0] => 5 [1] => 34 [2] => 9 ) 
        [2] => "Chicago" 
    ) 
) 

I want to simplify the array based on the string value in [0] like “Kate”, “Mike” or “Paul”.
While doing that I want to merge the arrays in [1] and make it unique, as “Mike”‘s array in Desired Output.

I have no idea what to do or where to start. Please HELP!

  • 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-18T12:22:12+00:00Added an answer on June 18, 2026 at 12:22 pm

    Okay, you are dealing with arrays, so you may need to use functions that modify arrays. You will most likely also need a foreach loop to iterate over the array. Auxiliary variables may also be useful.

    It is similar to the kid’s toy where they insert objects into various shapes. Just match the values against each other. If they fit then merge them. It is only difficult if you do not care to learn it.

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

Sidebar

Related Questions

i want to have a foreach loop where the initial array is changed inside
I have this array: ArrayList<Problem> problems = new ArrayList <Problem>( 100 ); then I
i want to set my array key initial value to a certain number. here
I have a 2-dimensional array in Ruby that I want to produce a working
I am dynamically building menu's based on an array and there is a sub-menu
I have an array $myarray; I want to paginate the array content, here is
Put simply, I want to subtract one array from another. The arrays are arrays
Initial array: 2 23 34 27 89 14 26 30 60 k = 3
In Javascript, I'm trying to take an initial array of number values and count
I have a 2D array such as: // construct initial **array int **arr; arr

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.