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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T06:43:24+00:00 2026-06-15T06:43:24+00:00

I have an array like: Array ( [0] => Array ( [A] => khaja.ghc@cdc.com

  • 0

I have an array like:

Array ( 
    [0] => Array ( 
        [A] => khaja.ghc@cdc.com 
        ) 
    [1] => Array ( 
        [A] => bag@example.com 
        ) 
    ) 

Is there any easy process to store khaja.ghc@cdc.com and bag@example.com in an array in php? If so please help me.
I am doing this by foreach() method and after getting element I stored them in an array. Then finally by array_push() method I got the required array. But I think I missed easy process. Can you help me .

  • 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-15T06:43:25+00:00Added an answer on June 15, 2026 at 6:43 am

    You still can use foreach modifing the value. Try

    foreach($array as $key => &$value) {
        if(is_array($value) && isset($value['A'])) $value = $value['A'];
    }
    

    and your $array will look like you want it to look.

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

Sidebar

Related Questions

I have an Array like below in PHP array( (int) 0 => array( 'id'
Let's say I have array like {12,23,,34,22,,,12} If there are 5 items as than
I have a multidimensional php array like this Array ( [0] => Array (
I have an array like this: Array ( [0] => <one@one.com> [1] => <two@two.co.in>
I have an array like: $example = array(car=>red, banana=>yellow, etc...) Is it possible to
I have an array like that: <?php array( array( 'id' => 1, 'parent_id' =>
I have array like this: $path = array ( [0] => site\projects\terrace_and_balcony\mexico.jpg [1] =>
Hello i have array like this [0] => Array ( [ExamMonth] => Array (
An array is defined of assumed elements like I have array like String[] strArray
I have array result like this: Array ( [0] => stdClass Object ( [id_global_info]

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.