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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T05:26:14+00:00 2026-05-24T05:26:14+00:00

lets say from zero to more is important level of the value # very

  • 0

lets say from zero to more is important level of the value

  # very imporant
  0 =>
    array
      'index' => string 'helloworld:Index' (length=16)
      404 => string 'helloworld:Missinga' (length=19)
      503 => string 'helloworld:Offline' (length=18)
      'nojs' => string 'helloworld:Nojs' (length=15)
      'blog' => string 'helloworld:blog' (length=15)
  # important
  1 => 
    array
      'index' => string 'helloworld:Index' (length=16)
      404 => string 'helloworld:Missingb' (length=19)
      503 => string 'helloworld:Offline' (length=18)
      'nojs' => string 'helloworld:Nojs' (length=15)
      'blogb' => string 'helloworld:blog' (length=15)
  # not that important
  2 => 
    array
      'index' => string 'helloworld:Index' (length=16)
      404 => string 'helloworld:Missingc' (length=19)
      503 => string 'helloworld:Offline' (length=18)
      'nojs' => string 'helloworld:Nojs' (length=15)
       'more' => string 'helloworld:Nojs' (length=15)
  # so on

join them into one array to something like this

    array
      'index' => string 'helloworld:Index' (length=16) # from 0 ( others same key )
      404 => string 'helloworld:Missinga' (length=19)  # from 0 ( others same key )
      503 => string 'helloworld:Offline' (length=18)   # from 0 ( others same key )
      'nojs' => string 'helloworld:Nojs' (length=15)   # from 0 ( others same key )
      'blog' => string 'helloworld:blog' (length=15)   # from 0 ( new )
      'blogb' => string 'helloworld:blog' (length=15)  # from 1 ( new )
      'more' => string 'helloworld:Nojs' (length=15)   # from 2 ( new )
  1. when the key is different = append
  2. when the key is same = check important level get one highest level

question what is the best way we can merge multiple into array but something like this?

thanks for looking in

Adam Ramadhan

  • 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-05-24T05:26:14+00:00Added an answer on May 24, 2026 at 5:26 am

    You can do this

    $array1 + $array2 + array3;
    

    Unlike array_merge(), the one with the most importance goes first, and numeric keys are respected.

    If, like in your question, you are merging array elements in the same array, you can do

    $result = array();
    foreach ($array as $value) { $result += $value; }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a set of ids in a table (column id), lets say from
Lets say that input from the user is a decimal number, ex. 5. 2155
Lets say we have a derivided class SerializableLabel from the base class System.Windows.Controls. [XmlRoot(SerializableLabel)]
Lets say I have two subqueries: SELECT Id AS Id0 FROM Table0 => Id0
So lets say i have a query like this SELECT a as d,b,c FROM
I am running my django project from subfolder of a website. Lets say the
I'm trying to format a table from XML. Lets say I have this line
Is it possible through javascript to read the number from the iphone. Lets say
I am using server.transfer to redirect from one to another page... lets say when
Lets say we have numbers from 1 to 25 and we have to choose

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.