API JSON Help

Discussion in 'PHP' started by Arcania, Mar 14, 2013.

  1. #1
    First off view this url:
    http://api.icndb.com/jokes/random?escape=javascript

    I have curl taking the html of that page and saving it into a variable, $result.
    Problem is how do I trim off all of the text besides the actual joke?

    It gives me:
    { "type": "success", "value": { "id": 394, "joke": "\"Let the Bodies Hit the Floor\" was originally written as Chuck Norris\' theme song.", "categories": [] } }

    When I only want:
    Let the Bodies Hit the Floor\" was originally written as Chuck Norris\' theme song.
     
    Arcania, Mar 14, 2013 IP
  2. Arcania

    Arcania Peon

    Messages:
    7
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    1
    #2
    I figured out a way. Thanks.
     
    Arcania, Mar 14, 2013 IP