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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T16:06:51+00:00 2026-06-17T16:06:51+00:00

If i knew the correct terms to search these would be easy to google

  • 0

If i knew the correct terms to search these would be easy to google this but im not sure on the terminology.

I have an API that returns a big object. There is one particular one i access via:

$bug->fields->customfield_10205[0]->name;
//result is johndoe@gmail.com

There is numerous values and i can access them by changing it from 0 to 1 and so on

But i want to loop through the array (maybe thats not the correct term) and get all the emails in there and add it to a string like this:

implode(',', $array);
//This is private code so not worried too much about escaping

Would have thought i just do something like:
echo implode(‘,’, $bug->fields->customfield_10205->name);

Also tried
echo implode(‘,’, $bug->fields->customfield_10205);

And
echo implode(‘,’, $bug->fields->customfield_10205[]->name);

The output im looking for is:
‘johndoe@gmail.com,marydoe@gmail.com,patdoe@gmail.com’

Where am i going wrong and i apologize in advance for the silly question, this is probably so newbie

  • 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-17T16:06:52+00:00Added an answer on June 17, 2026 at 4:06 pm

    You need an iteration, such as

    # an array to store all the name attribute
    $names = array();
    
    foreach ($bug->fields->customfield_10205 as $idx=>$obj)
    {
      $names[] = $obj->name;
    }
    
    # then format it to whatever format your like
    $str_names = implode(',', $names);
    

    PS: You should look for attribute email instead of name, however, I just follow your code

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

Sidebar

Related Questions

I did not knew that this simple thing would be slightly complicated. I have
I knew javascript could have rounding issue with divisions, but not with multiplication. How
I knew what is an intent in android. But i have a concern regarding
I knew this day would come, so I guess it is here. (P.S. I
I knew IE8 was a pain, but I have never seen it give me
I knew, my questions may create some angry on me. But, I have no
This would be pretty straight forward if I knew the types at compile time
I found an example on this link I knew C++ does not support finally
I thought I knew how this worked - obviously not. I'm not able to
Im knew on MVC and on Ruby on rail environment I have this code

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.