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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T03:01:01+00:00 2026-06-03T03:01:01+00:00

I have a big JSON object with lots of data in it. I want

  • 0

I have a big JSON object with lots of data in it. I want to print out a specific bit of data from it, but can’t seem to find the right syntax for the print statement.

Here’s the first bit of the json object so you can see the structure:

{"response":{"status":"OK","advertisers":[{"id":26243,"code":null,"name":"Tego","state":"inactive","default_brand_id":null,"remarketing_segment_id":null,"lifetime_budget":null,"lifetime_budget_imps":null,"daily_budget":null,"daily_budget_imps":null,"enable_pacing":null,"profile_id":508487,"control_pct":0,"timezone":"PST8PDT","last_modified":"2011-08-11 04:35:39","stats":null,"billing_internal_user":null,"billing_address1":"","billing_address2":"","billing_city":"","billing_state":"","billing_country":"","billing_zip":"","default_category":{"id":"5","name":"Computers and Electronics"},"default_currency":"USD","labels":[{"id":"1","name":"Salesperson","value":"Kurt Mackey"},{"id":"3","name":"Account Manager",}],"use_insertion_orders":false,"time_format":"12-hour","default_brand":null},

I want to return the ID of the first advertiser (which should be 26243).

I’m trying to print that out with this statement:

print $result->response->advertisers[0]->id

But it does not appear to be working. I get a blank white page.

What am I doing wrong?

  • 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-03T03:01:01+00:00Added an answer on June 3, 2026 at 3:01 am

    You need to decode the string first with json_decode($jsonString). After that you will be able to access the different properties through the print statement you quoted.

    $json = '{"response":{"status":"OK","advertisers":[{"id":26243,"code":null,"name":"Tego","state":"inactive","default_brand_id":null,"remarketing_segment_id":null,"lifetime_budget":null,"lifetime_budget_imps":null,"daily_budget":null,"daily_budget_imps":null,"enable_pacing":null,"profile_id":508487,"control_pct":0,"timezone":"PST8PDT","last_modified":"2011-08-11 04:35:39","stats":null,"billing_internal_user":null,"billing_address1":"","billing_address2":"","billing_city":"","billing_state":"","billing_country":"","billing_zip":"","default_category":{"id":"5","name":"Computers and Electronics"},"default_currency":"USD","labels":[{"id":"1","name":"Salesperson","value":"Kurt Mackey"},{"id":"3","name":"Account Manager",}],"use_insertion_orders":false,"time_format":"12-hour","default_brand":null}'
    $jsonObj = json_decode($json);
    print_r($jsonObj);
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a big json object containing cell data from a sample spreadsheet that
I have got a big JSON object (from Google Feed API) and a URL
I have a big object I want to convert to JSON and send. However
I have big dataset (but the following is small one for example). I can
i have an app that is showing data in listview ,but i want first
I'm new to JSON, but I have experience in PHP. Can someone explain to
I have one big div with id=elements and I load from JSON file new
I have to load a very big JSON object and perform various expensive processes.
I want to turn an R data.frame into a JSON object in order to
I have big set of urls and I want to implement an autocompletion. I

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.