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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T10:27:39+00:00 2026-06-04T10:27:39+00:00

i have two array and i want to make unique array with single array

  • 0

i have two array and i want to make unique array with single array

for example i have $a=array(3); and $b=array(1,2,3) so i want $c=array(1,2,3)

i made a code like:

            $a=array(3);
        $b=explode(',','1,2,3');
        $ab=$a+$b;
        $c=array_unique ($ab);
            print_r($c);

it gives me Array ( [0] => 3 [1] => 2 )

but i want to Array ( [0] => 1 [1] => 2 [2] => 3 )

  • 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-04T10:27:41+00:00Added an answer on June 4, 2026 at 10:27 am
    $a = array(1,2,3,4,5,6);
    
    $b = array(6,7,8,2,3);
    
    $c = array_merge($a, $b);
    
    $c = array_unique($c);
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a two dimensional array with coordinates and i want to make the
I have two functions and i want to make it like one. function 1
I have two array and three button in segment control i want that when
i have two arrays like this first array Array ( [0228] => Array (
I have two arrays in php and I need to make a new array
I have an array which appears like the one below. I want to slice
I have a two-dimensional array (of Strings) which make up my data table (of
I have two php arrays like these: Array ( [0] => Array ( [id]
I have two questions: 1) How can I make an array which points to
Have two UIBarButtonItems want to make it as one UIBarButtonItem and toggle between them

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.