PHP function of the day: json_decode()

For day 6 of 21 in the “PHP Function of the day” series, I’m going to look at json_decode().  You might remember json_encode() from last week.  Where json_encode() encodes data as JSON, json_decode() decodes JSON data. Let’s take a look. <?php $data = ‘{“First_Name”:”Joe”,”Last_Name”:”Steinbring”,”Website”:”jws.dev”}’; var_dump($data); echo(‘<br />’); var_dump(json_decode($data)); echo(‘<br />’); var_dump(json_decode($data, true)); ?>   See the output …

Continue reading "PHP function of the day: json_decode()"