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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T20:50:56+00:00 2026-05-15T20:50:56+00:00

I found an API which gives out results in the form of a multidimensional

  • 0

I found an API which gives out results in the form of a multidimensional array.

I am unable to echo the values of the array.

Sample response

Array
(
[query] => Array
        (
            [count] => 1
            [created] => 2010-07-16T08:35:38Z
            [lang] => en-US
            [results] => Array
                (
                    [item] => Array
                        (
                            [rel] => rel:Person
                            [resource] => http://twitter.com/twitter
                            [meta] => Array
                                (
                                    [0] => Array
                                        (
                                            [property] => foaf:name
                                            [content] => Twitter
                                        )
                                )
                        )
               )
        )
 )

I can echo some values..like

echo $array["query"]['count']."<br />";   
echo $array["query"]["results"]["item"]["resource"];

but, when I want to use the [meta] => Array

I am not able to use 🙁

echo $array["query"]["results"]["item"]["resource"]["meta']["0"["content"];
  • 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-05-15T20:50:56+00:00Added an answer on May 15, 2026 at 8:50 pm

    You should use your debugging skills to tackle this kind of problem.

    • First, print_r() your $array, which you did.
    • Then print_r($array['query'])
    • Then print_r($array['query']['results'])
    • and so on, and so on

    When you get to print_r($array["query"]["results"]["item"]["resource"]), you see that the result is not an array, it’s a scalar, thus you need a different index.

    Good luck!

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

Sidebar

Related Questions

In the YouTube API docs I found this example : https://gdata.youtube.com/feeds/api/videos?q=surfing&max-results=10&fields=entry[yt:statistics/@viewCount>1000000] Which, of course,
In testing out our API, one of our testers found out that when they
I am interested in querying a REST API using Groovy. I found HttpURLClient which
[Update: I've found the API reference. The method used is below] <?php wp_delete_post( $postid,
I have searched for this, and i found that for api less than 12,
I've found a PDF file of Appstore search API, that I can use some
I've found this page about the Twitter search API and some operators : http://search.twitter.com/operators
Working with an undisclosed API, I found a function that can set the number
I've found a few tutorials that explain how to use the windows API to
I have a class API which has full code coverage and uses DI to

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.