How to get Deeplinks in JSON format with PHP?
This is the JSON object I actually have
{
    "_type": "SearchResponse",
    "webPages": {
        "webSearchUrl": "https:\/\/www.bing.com\/cr?IG=B470EF0A41D94B338002992668141CC5&CID=1B1D0110A94966F5383E0B4AA8A067DE&rd=1&h=sFk5GtkV8PxaqVq0K3GniaQOQJqKR2jqw1udftLC9QE&v=1&r=https%3a%2f%2fwww.bing.com%2fsearch%3fq%3dcontemporary%2bfurniture&p=DevEx,5336.1",
        "totalEstimatedMatches": 46000000,
        "value": [{
            "id": "https:\/\/api.cognitive.microsoft.com\/api\/v5\/#WebPages.0",
            "name": "Contemporary Furniture. Modern and Scandinavian designs.",
            "url": "https:\/\/www.bing.com\/cr?IG=B470EF0A41D94B338002992668141CC5&CID=1B1D0110A94966F5383E0B4AA8A067DE&rd=1&h=Q0wwocl-JR44YrK1RsR_5rSqO4KPlSPx0KgUi-sMocA&v=1&r=https%3a%2f%2fcontemporaryfurniture.com%2f&p=DevEx,5080.1",
            "displayUrl": "https:\/\/contemporaryfurniture.com",
            "snippet": "The finest in contemporary and modern furniture. Imported and domestic styles, bedrooms, sofas, home office, more. Shop online or visit our NY showroom.",
            "deepLinks": [{
                "name": "Bedrooms",
                "url": "https:\/\/www.bing.com\/cr?IG=B470EF0A41D94B338002992668141CC5&CID=1B1D0110A94966F5383E0B4AA8A067DE&rd=1&h=jo1rIVengiXnaKOkFczZ54qrp9-L4W2jb1sJ41jl04g&v=1&r=https%3a%2f%2fwww.contemporaryfurniture.com%2fshop%2fbedrooms-19%2f&p=DevEx,5072.1",
                "snippet": "Bedroom sets including beds, dressers, nightstands and chests. Produced in various woods and lacquers. Contemporary, scandinavian and modern designs."
            }, {
                "name": "Dining Rooms",
                "url": "https:\/\/www.bing.com\/cr?IG=B470EF0A41D94B338002992668141CC5&CID=1B1D0110A94966F5383E0B4AA8A067DE&rd=1&h=EsyLPbUccu5BzwCeceP_S5u46vo4gSDMG7vP29BfjFE&v=1&r=https%3a%2f%2fwww.contemporaryfurniture.com%2fshop%2fdining-rooms-12%2f&p=DevEx,5073.1",
                "snippet": "Dining Room sets, dining tables, servers, buffet and china cabinets. Contemporary and Scandinavian styles."
            }, {
                "name": "Barstool",
                "url": "https:\/\/www.bing.com\/cr?IG=B470EF0A41D94B338002992668141CC5&CID=1B1D0110A94966F5383E0B4AA8A067DE&rd=1&h=6rOwsJH4uT4LzjG833eSRYQgDMCKiogHGdgnokFVSEg&v=1&r=https%3a%2f%2fwww.contemporaryfurniture.com%2fshop%2fbarstool-16%2f&p=DevEx,5074.1",
                "snippet": "Barstools and counterstools contemporary, modern and scandinavian designs produced in wood and metal."
            }, {
                "name": "Chairs",
                "url": "https:\/\/www.bing.com\/cr?IG=B470EF0A41D94B338002992668141CC5&CID=1B1D0110A94966F5383E0B4AA8A067DE&rd=1&h=ADlw0i43aQhdLC0tHBfjMFjYwiWYHZ3ggdG6RhZv9ss&v=1&r=https%3a%2f%2fwww.contemporaryfurniture.com%2fshop%2fchairs-13%2f&p=DevEx,5075.1",
                "snippet": "Chairs to compliment your living room produced in fabric upholstery and leather. Contemporary and modern designs."
            }],
            "dateLastCrawled": "2017-03-31T17:25:00"
        }, {
            "id": "https:\/\/api.cognitive.microsoft.com\/api\/v5\/#WebPages.1",
            "name": "Contemporary Furniture | Houzz",
            "url": "http:\/\/www.bing.com\/cr?IG=B470EF0A41D94B338002992668141CC5&CID=1B1D0110A94966F5383E0B4AA8A067DE&rd=1&h=vsM0va_8kehN5ZnPil2frs3eKL16FOHnut88FvEHRsM&v=1&r=http%3a%2f%2fwww.houzz.com%2fphotos%2fcontemporary%2ffurniture&p=DevEx,5098.1",
            "displayUrl": "www.houzz.com\/photos\/contemporary\/furniture",
            "snippet": "Browse a wide selection of contemporary furniture for sale on Houzz, including wood furniture and leather furniture for your dining room, office, bedroom and living room.",
            "dateLastCrawled": "2017-03-30T22:51:00"
        }, {
            "id": "https:\/\/api.cognitive.microsoft.com\/api\/v5\/#WebPages.2",
            "name": "Affordable Modern Furniture, Decor & Lighting online. Free ...",
            "url": "https:\/\/www.bing.com\/cr?IG=B470EF0A41D94B338002992668141CC5&CID=1B1D0110A94966F5383E0B4AA8A067DE&rd=1&h=OwOQI48E8ZhxF8xWw-iB2POJliBV0LIE3CucLePUzeg&v=1&r=https%3a%2f%2fwww.contemporaryfurniturewarehouse.com%2f&p=DevEx,5112.1",
            "displayUrl": "https:\/\/www.contemporaryfurniturewarehouse.com",
            "snippet": "Modern & Contemporary Furniture on sale. Shop for sofas, sectionals, accent chairs, dining chairs, bar stools, office chairs, stools, outdoor furniture & more.",
            "dateLastCrawled": "2017-03-31T02:54:00"
        }
And here is the code I did so far:
    $i=1;       
    foreach($data->webPages->value as $val){
        if($i==1){
            $part   = $val['deepLinks']->snippet;
        }   
    $i++;       
    }
Results in: Fatal error: Cannot use object of type stdClass as array. 
how to get that value?
 
     
     
    