While working with twitter API, I get response in json format.
I could fetch json value seperately but needs helps in showing response in formatted way.
response looks like:
object(stdClass)#5 (39) { ["id"]=> float(2315798479) ["id_str"]=> string(10) "231579847349" ["name"]=> string(9) "jassy" ["screen_name"]=> string(11) "jasid" ["location"]=> string(0) "" ["description"]=> string(0) "" ["url"]=> NULL ["entities"]=> object(stdClass)#6 (1) { ["description"]=> object(stdClass)#7 (1) { ["urls"]=> array(0) { } } } ["protected"]=> bool(false) ["followers_count"]=> int(1) ["friends_count"]=> int(2) ["listed_count"]=> int(0) ["created_at"]=> string(30) "Tue Jan 28 17:00:38 +0000 2014" ["favourites_count"]=> int(0) ["utc_offset"]=> NULL ["time_zone"]=> NULL ["geo_enabled"]=> bool(false) ["verified"]=> bool(false) ["statuses_count"]=> int(0) ["lang"]=> string(2) "en" ["contributors_enabled"]=> bool(false) ["is_translator"]=> bool(false) ["is_translation_enabled"]=> bool(false) ["profile_background_color"]=> string(6) "C0DEED" ["profile_background_image_url"]=> string(48) "http://abs.twimg.com/images/themes/theme1/bg.png" ["profile_background_image_url_https"]=> string(49) "https://abs.twimg.com/images/themes/theme1/bg.png" ["profile_background_tile"]=> bool(false) ["profile_image_url"]=> string(79) "http://abs.twimg.com/sticky/default_profile_images/default_profile_1_normal.png" ["profile_image_url_https"]=> string(80) "https://abs.twimg.com/sticky/default_profile_images/default_profile_1_normal.png" ["profile_link_color"]=> string(6) "0084B4" ["profile_sidebar_border_color"]=> string(6) "C0DEED" ["profile_sidebar_fill_color"]=> string(6) "DDEEF6" ["profile_text_color"]=> string(6) "333333" ["profile_use_background_image"]=> bool(true) ["default_profile"]=> bool(true) ["default_profile_image"]=> bool(true) ["following"]=> bool(false) ["follow_request_sent"]=> bool(false) ["notifications"]=> bool(false) }
I can get inditivual value like this:
print $content->{'name'};
php:
$content = $connection->get('account/verify_credentials');
print $content->{'name'}; // 12345
var_dump($content);
I want to see all result in formatted ways. currently response looks like messed up ..