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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T01:51:57+00:00 2026-06-13T01:51:57+00:00

Firstly sorry If I didn’t write the title correct because I really cant explain

  • 0

Firstly sorry If I didn’t write the title correct because I really cant explain it that good.

Okay so I’m making a twitter app and I used this code

if(!empty($_SESSION['username'])){
    $twitteroauth = new TwitterOAuth('MY PRIVATE CODE', 'MY PRIVATE CODE',     $_SESSION['oauth_token'], $_SESSION['oauth_secret']);
}

$home_timeline = $twitteroauth->get('/statuses/user_timeline');
print_r($home_timeline);

I connected it with my twitter account and this isn’t the full code, part of it. So this echos.

Array ( [0] => stdClass Object ( [created_at] => Wed Oct 10 19:27:42 +0000 2012 [id] => 256113796215603202 [id_str] => 256113796215603202 [text] => Testing a few thing on my twitter app. ) )

And it prints a few other stuff in the array but I cut it. How do I get the value of the text from the array text? Where it says [text] I would like to have the value of it?

I’ve spent atleast 30 minutes searching and I couldn’t find the answer. If it is a simple function already made by php then can you please tell me. If it is a long line of code can you tell 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-13T01:51:58+00:00Added an answer on June 13, 2026 at 1:51 am

    I think you are getting tripped up on the fact that you have an array with an object in it. when you access the array[0] you are now interacting with an Object.

    the print_r is showing you that [text] is not an index in the array so:

    array[‘text’] does not exist. [text] is a property of the stdObject.

    so to get the text it would just be $yourArray[0]->text.

    note: if you put your print_r or var_dumps between <pre> </pre> tags then they will look better and be less confusing

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

Sidebar

Related Questions

Firstly, sorry if my title doesn't quite explain the situation, I had problems thinking
Firstly sorry, I'm a really big beginner. I ran into a problem that I
Firstly, sorry for the difficult question title, but I can't think of anything better.
I am sorry if the title is unclear. Allow me to elaborate further. Firstly,
Greetings, everyone: Firstly, sorry that my Flow description is long winded, but I think
Sorry if the title is misleading, but I really couldn't think of anything better.
Firstly, sorry about the question title, it may not be very descriptive for my
Firstly, sorry for my English. I'm Brazilian guy that is improving yet. I want
Firstly, sorry about the wall of text. I have the following schema. Note that
Firstly, I feel sorry about the title, I do not know how to describe

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.