jsonp_decode

function jsonp_decode($jsonp, $assoc = false) {
    $json = preg_replace("/[^(]*\((.*)\)/", "$1", $jsonp);
    return json_decode($json, $assoc);
}

Leave a comment

Your email address will not be published. Required fields are marked *