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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T03:37:58+00:00 2026-06-10T03:37:58+00:00

I have an array result that contains multiple arrays. I need to grab all

  • 0

I have an array result that contains multiple arrays. I need to grab all of the “text” fields of the 2nd level of arrays and combine them into a single variable. I’m drawing a blank on how to do this

Array:

Array ( 
[0] => stdClass Object ( 
    [created_at] => Mon, 20 Aug 2012 18:31:50 +0000 
    [from_user] => CollectHW 
    [from_user_id] => 769712384 
    [from_user_id_str] => 769712384 
    [from_user_name] => Collect Hot Wheels 
    [geo] => 
    [id] => 237617956643827712 
    [id_str] => 237617956643827712 
    [iso_language_code] => en 
    [metadata] => stdClass Object ( 
        [result_type] => recent ) 
    [profile_image_url] => url 
    [profile_image_url_https] => url
    [source] => web **
    [text] => Second Tweet #step2** 
    [to_user] => 
    [to_user_id] => 0 
    [to_user_id_str] => 0 
    [to_user_name] => ) 
[1] => stdClass Object ( 
    [created_at] => Mon, 20 Aug 2012 16:41:53 +0000 
    [from_user] => CollectHW 
    [from_user_id] => 769712384 
    [from_user_id_str] => 769712384 
    [from_user_name] => Collect Hot Wheels 
    [geo] => 
    [id] => 237590287504011264 
    [id_str] => 237590287504011264 
    [iso_language_code] => en 
    [metadata] => stdClass Object ( 
        [result_type] => recent ) 
    [profile_image_url] => url 
    [profile_image_url_https] => url 
    [source] => web **
    [text] => First Tweet #step1** 
    [to_user] => 
    [to_user_id] => 0 
    [to_user_id_str] => 0 
    [to_user_name] => ) 
) 
  • 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-10T03:38:00+00:00Added an answer on June 10, 2026 at 3:38 am
    for($i = 0; $i < count($array); $i++) {
        echo "The text for $i is: " . $array[$i][text] . "\n";
    }
    

    Result

    The text for 0 is: Second Tweet #step2**
    The text for 1 is: First Tweet #step1**
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have an array result that contains values from 0-255. I originally declared it
I have an object Results that contains an array of result objects along with
I have an array DetailsArray in VB.NET which contains the result of a LINQ
Now I currently have an array that contains 120 pairs. For example: [[1, 12],
Let's say I have an Array that contains more than three repetitions of a
I have a web service that when invoked, returns a Result object that contains
I have a custom object that contains an array (called children) where objects of
I have a C# class library that contains methods that need to be used
A column in my table contains email addresses. I have a text string that
I have a record that contains a dynamic array. It is normal that when

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.