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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T07:32:56+00:00 2026-06-09T07:32:56+00:00

I have a list of items from a database being parse in an array

  • 0

I have a list of items from a database being parse in an array

Array
(
    [0] => Array
        (
            [dToken] => 731fea87ea9dc61f16e93f1ad2b964bf1926633acac151c1853ab91ea0465228
            [0] => 731fea87ea9dc61f16e93f1ad2b964bf1926633acac151c1853ab91ea0465228
        )

    [1] => Array
        (
            [dToken] => d890a5002f7da8bd35f6cae50e597d6f11554b26ba686bc7314afe77d1b36a61
            [0] => d890a5002f7da8bd35f6cae50e597d6f11554b26ba686bc7314afe77d1b36a61
        )

)

I need to get all of the dTokens and list them out in a variable with each dToken seperated by a comma except the last in the list.

foreach($result as $device['dToken'] => $token){
    //$devices = $token['dToken'];
    print_r($token['dToken']);
}

Any help please?

  • 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-09T07:32:58+00:00Added an answer on June 9, 2026 at 7:32 am

    You’re just about there.

    $tokens = array();
    foreach($result as $device){
        $tokens[] = $device['dToken'];
    }
    echo implode(',', $tokens);
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Say I have a list of items from a database. Next to each item
I have a query pulling from a database: List<myClass> items = new List<myClass>(from i
I have a method which is list my items from a server. Therefore, this
I have a list of items that are created from the results of website
I have a list of items that are displayed using a ListView from a
Using the method from Steve Sanderson's blog , I have a list of items
I have a dynamically created list. Items from the list should be able to
I have a page with a list of items initially loaded from a include_once('show_calendarV2.php');
I am trying to remove items from a nested list in Python. I have
I have a big list of over 20000 items to be fetched from DB

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.