Created
February 16, 2017 23:58
-
-
Save aboglioli/0e24b06e6f5a6fa68c22e8dba33aa509 to your computer and use it in GitHub Desktop.
PHP Array to JSON
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$datos = [ | |
"title"=> "Property title", | |
"category_id"=> "MLU1468", | |
"price"=> 100000, | |
"currency_id"=> "UYU", | |
"available_quantity"=> 1, | |
"buying_mode"=> "classified", | |
"listing_type_id"=> "silver", | |
"condition"=> "not_specified", | |
"pictures"=> [ | |
[ "source" => "http=>//mla-d2-p.mlstatic.com/item-de-test-no-ofertar-543605-MLA25041518406_092016-O.jpg?square=false" ] | |
], | |
"seller_contact" => [ | |
"contact"=> "Contact name", | |
"other_info"=> "Additional contact info", | |
"area_code"=> "011", | |
"phone"=> "4444-5555", | |
"area_code2"=> "", | |
"phone2"=> "", | |
"email"=> "contact-email@somedomain.com", | |
"webmail"=> "" | |
], | |
"location"=> [ | |
"address_line"=> "My property address 1234", | |
"zip_code"=> "01234567", | |
"neighborhood"=> [ | |
"id"=> "TUxBQlBBUzgyNjBa" | |
], | |
"latitude"=> -34.48755, | |
"longitude"=> -58.56987 | |
], | |
"attributes"=> [ | |
[ "id"=> "MLU1466-AMBIENTES", "value_name"=> "2" ] | |
], | |
"description"=> "This is the real estate property descritpion." | |
]; | |
print json_encode($datos); | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment