I want to show the name, city, etc. and I don't want to show all the data just some of it.
<?php
$url='my url';
$res = \Httpful\Request::get($url)->expectsJson()->send();
$data = json_decode($res,true);
print_r($data); ?>
The output is:
Array ( [message] => OK [property] => Array ( [id] => 193547 [broker_id] => 4772 [second_broker_id] => 7530 [third_broker_id] => 4695 [address] => 534 Canyon Drive [city] => Eyota [state] => MN [zip] => 55934 [county] => Olmsted [market] => [submarket] => [cross_streets] => [location_description] => The Subject Property is positioned along Hwy 42, the road from Interstate 90 heading into Eyota. Adjacent to the property is a 34-unit assisted living/memory care center, as well as a small residential development. Less than 1 mile away is the city’s West Side Park, which has 2 baseball fields, a skate park, sand volleyball courts and it even hosts a farmers market during warmer summer months. Eyota has a population of 2,025 and is just 13 miles east of Rochester, which has a population of 100,000. [latitude] => 43.995568 [longitude] => -92.24475 [name] => Dollar General #17079 [property_type_id] => 2 [property_subtype_id] => 203 [additional_property_subtype_ids] => Array ( )
If you want specific data only directly access it with key.
As per your example:
$data = json_decode($res,true);
$name = $data['properties'][0]['name'];
$city = $data['properties'][0]['city'];