note 96169 deleted from function.json-decode by salathe

From: Date: Mon, 21 Sep 2020 15:01:58 +0000
Subject: note 96169 deleted from function.json-decode by salathe
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-215442@lists.php.net to get a copy of this message
Note Submitter: php at hm2k.org ---- If var_dump produces NULL, you may be experiencing JSONP aka JSON with padding, here's a quick fix... <?php //remove padding $body=preg_replace('/.+?({.+}).+/','$1',$body); // now, process the JSON string $result = json_decode($body); var_dump($result); ?>

« previous php.notes (#215442) next »