Take the 2-minute tour ×
Stack Overflow is a question and answer site for professional and enthusiast programmers. It's 100% free, no registration required.

I am implementing a dictionary API, where a method is returning an array in the following format.

Array (
[0] => Related Object (
    [label1] => [relationshipType] => synonym
    [label2] => [label3] => [words] => Array (
        [0] => region
        [1] => territory
        [2] => country
        [3] => land
        [4] => estate
        [5] => possession
        [6] => field
        [7] => dregs
        [8] => lees
        [9] => feces
    )
    [gram] => [label4] => 
)
)

Now my objective is to print the values of integer indices that are

[0] => region
[1] => territory
[2] => country
[3] => land
[4] => estate
[5] => possession
[6] => field
[7] => dregs
[8] => lees
[9] => feces

How can I do this, I didn't find a suitable way for it, so I came here for help.

share|improve this question
    
Finally, I found the solution myself. Just use this like of code: print_r($word[0]->words); –  Muhammad Sohail Mar 16 at 12:13

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.