Hey im playing around with php and json and im trying to decode the following into a nice neat table:
http://www.openpalace.org/webservice/directory/get?content-type=application%2Fjson
I am hoping it to come out something like this for i customize it and play around:
http://www.openpalace.org/webservice/directory/get
Here is the following code i been messing around with:
<?php
$json = file_get_contents('http://www.openpalace.org/webservice/directory/get');
$obj = json_decode($json);
print "Number: ";
print $obj->{'count'};
print "<pre>";
var_dump(json_decode($json));
var_dump(json_decode($json, true));
?>
Also, please note im gathering this content and carrying it over to another website.
(http://palacebox.com/test.php)
In the end i want it to come out to something like this:
[code=html]| Name | website | language |
| Description:
|
|
|
|
| Room Count | Population |[/code]
and make it repeat that table for each listing basically.