fork download
  1. <?php
  2.  
  3. // just to show how we might receive this data
  4. $jsonVar = '{"public-profile-url" : "I\'m the data"}';
  5.  
  6. // turn it into a PHP object:
  7. $user = json_decode($jsonVar);
  8.  
  9. // let's look at it
  10. print_r($user);
  11.  
  12. echo "public-profile-url: " . $user->{'public-profile-url'};
Success #stdin #stdout 0.02s 24400KB
stdin
Standard input is empty
stdout
stdClass Object
(
    [public-profile-url] => I'm the data
)
public-profile-url: I'm the data