PHP Read JSON Data

Discussion in 'PHP' started by karlbryan, Feb 24, 2010.

  1. #1
    karlbryan, Feb 24, 2010 IP
  2. danx10

    danx10 Peon

    Messages:
    1,179
    Likes Received:
    44
    Best Answers:
    2
    Trophy Points:
    0
    #2
    <?php
    
    $data = preg_replace("/jsonOodleApi\(|\);$/", "", file_get_contents("http://api.oodle.com/api/v2/listings?key=TEST&region=usa&category=job&location=San%20Mateo%2C%20CA&format=json"));
    
    $data = json_decode($data);
    var_dump($data);
    
    ?>
    PHP:
    You now have the data within an object...
     
    danx10, Feb 25, 2010 IP