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.