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