Source Code:
(back to article)
<?php $object = new stdClass(); $object->name = "John Doe"; $object->age = 35; $object->city = "New York"; echo json_encode($object); ?>
Result:
Report an issue