Anyone knows where i can get good introduction info on json in relation to php
You can check the PHP manual for JSON functions: json_encode and json_decode
You can also take a look at json.org for the JSON spec.
In brief, JSON is a data format that can be read natively by Javascript, which makes it very fast and convenient for doing AJAX requests or generally passing information from server-side scripts to Javascript.
there's not much to be introduced to. try var_dump(json_encode($x));
and var_dump(json_decode(json_encode($x)));
for different values (and types) of $x
, and you know basically everything there is to it.
IMHO, you need a good introduction to JavaScript before you can use JSON with your PHP application. Once you master JavaScript {Objects}, [Arrays] and (Functions), all of the brackets used inside JSON will start to make sense.