I'm working on `facebook sdk 4.0` for php. i retrieved friend list in array and I'm unable to access picture from the array. array format is as follows:

```
Array
(
    [data] => Array
        (
            [0] => stdClass Object
                (
                    [id] => AaJvu1z_MAA0INV57e4Bg5hOCaJDzObdptiArw
                    [name] => Mr. John
                    [picture] => stdClass Object
                        (
                            [data] => stdClass Object
                                (
                                    [is_silhouette] => 
                                    [url] => https://fbprofile-a.akamaihd.net/picture.jpg
                                )

                        )

                )
)

```

My PHP Code is:

```
foreach ($friend_list['data'] as $friends) {
    $id = $friends->id;
    $name = $friends->name;
    $picture = $friends['data']->picture;
    echo "ID: ".$id."<br>";
    echo "Name: ".$name."<br>";
    echo "Picture: ".$picture."<br>";
}

```

"ID" and "Name" works fine. but there is an error in "picture object":

> 
> Error: Cannot use object of type stdClass as array
> 
> 
>