I'm calling on an API using Wordpress (widget).
But for some reason, it's not letting me display nested objects like so:
private function get_request($username) {
$url = wp_remote_get("https://api.github.com/users/essxiv/repos");
$response = json_decode(stripslashes($url['body']));
$nested_objs = $response[0]['id'];
print_r($nested_objs);
}
I've also tried to print_r($response[0]['username']);
Everytime I tried to load my localhost Wordpress, it gives me a different looking UI, with NO Admin Header and the border of the page is orange and not black..
I'm just stumped and really need to display these nested object's data.
What am I doing wrong? How do I get the data printed?