JSON in PHP Example

(Last Updated On: August 11, 2016)

PHP Program Sample:

<?php
$place = 'Arcot';
$pincode = '632503';
$place_pincode = array($place=>$pincode);
$json_value = json_encode ($place_pincode);
echo $json_value;
?>

Output:
{“Arcot”:”632503″}

361 total views, 0 views today

Leave a Reply

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