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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T23:26:00+00:00 2026-06-01T23:26:00+00:00

Hi it is any way to connect to records where value is the same?

  • 0

Hi it is any way to connect to records where value is the same?

like

[12]=> Array (
 [ID] => 127078
 [row1] => 
 [post] => N16 7UJ
)

[13]=> Array (
 [ID] => 127078
 [row1] => something
 [post] =>
)

and make like that

[12]=> Array (
 [ID] => 127078
 [row1] => something
 [post] => N16 7UJ
)
  • 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-01T23:26:01+00:00Added an answer on June 1, 2026 at 11:26 pm

    Here take this function

    <?php
    
    $array = array(
                    12 => array (
                     "ID" => '127078',
                     "row1" => '',
                     "post" => 'N16 7UJ',
                    ),
    
                    13 => array (
                     "ID" => '127078',
                     "row1" => 'something',
                     "post" => '',
                    )
    
                );
    function mergedup($array,$matcher){
        if(!function_exists('remove_element')){
            function remove_element($arr,$element){
                $ret_arr = array();
                foreach($arr as $val){
                    if($val !== $element){
                        array_push($ret_arr,$val);
                    }
                }
                return $ret_arr;    
            }
        }
        $array = remove_element($array,array());
        $return_array = array();
    
        while(isset($array[0])){
            $temp = $array[0];
            $array = remove_element($array,$temp);
            $array_temp = array();
            foreach($array as $vals){
                if($temp[$matcher]==$vals[$matcher]){
                    array_push($array_temp,$vals);
                    foreach($temp as $key => $val){
                        if(empty($temp[$key])){
                            $temp[$key] = $vals[$key];
                        }
                    }
                }
            }
            foreach($array_temp as $vals){
                $array = remove_element($array,$vals);
            }
            array_push($return_array,$temp);
        }
    
        return $return_array;
    }
    
    var_dump(mergedup($array,"ID"));
    ?>
    

    Tested and working

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

Sidebar

Related Questions

Is there any way to connect to RDC with help of smarphone? Can it
Is there any way to connect more then one PPC to ActiveSync in one
Is there is any way to connect multiple UIButtons to one IBOutlet? I want
is there any way to obtain the table prefix after connect to the database
Is there an easy way (without downloading any plugins) to connect to a MySQL
Any way to declare a new variable in F# without assigning a value to
Any way to make train() run with custom train/test partitions of the data? I'm
Is there any way for connect to a database and write it to a
Is there any way to connect to the local system (localhost) using BASH. To
Is there any way to extend the authentication operation which connects a client application

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.