Source Code:
(back to article)
<?php $data = array( "name" => "John Doe", "address" => array( "street" => "123 Main St", "city" => "Anytown", "state" => "CA", "zip" => "12345" ), "phone numbers" => array( "home" => "555-555-5555", "work" => "555-555-5556" ) ); $json = json_encode($data); echo $json;
Result:
Report an issue