i have seen many example of how to work with json but my problem is i dont know if there some software or class or whatever i need to install or to include in my page just to make the json work.. i try this code but it doesn’t work
this was the code i got from the internet:
[CODE]Documentation
A simple ./configure; make; make install should do the trick. Make sure to add an extension=json.so line to your php.ini/php.d.
Then, just use json_encode to encode your PHP values into JSON, and json_decode to decode JSON into a PHP value.
For example:
$val = array(“abc” => 12,
“foo” => “bar”,
“bool0” => false,
“bool1” => true,
“arr” => array(1, 2, 3, null, 5),
“float” => 1.2345
);
$output = json_encode($val);
echo $output.”n”;
Would produce:
{ “abc”: 12, “foo”: “bar”, “bool0”: false, “bool1”: true, “arr”: [ 1, 2, 3, null, 5 ], “float”: 1.234500 }
While:
$input = ‘{ “abc”: 12, “foo”: “bar”, “bool0”: false, “bool1”: true, “arr”: [ 1, 2, 3, null, 5 ], “float”: 1.234500 }’;
$val = json_decode($input);
echo $val->abc.”n”;
Would produce:
12
the php error said that the function json_encode($val); Does not seen… that example can be found in [url]http://www.aurore.net/projects/php-json/