tags:

views:

64

answers:

3

i want to make my server side in php. after writing the code in php can i directly use json to parse it of or something other required on the server side with php.

can you give me some example of it, how to do this on server side if i want to use json of my client side.

+2  A: 

You can't use JSON to parse things, JSON is the data format.

You can use a JSON parser and a JSON serializer at both ends (i.e. in client side JS and server side PHP).

http://json.org/ has links to parsers and serializers in various languages near the bottom, they have documentation which usually includes examples.

David Dorward
that what i want to ask you , on client side json parser and on the server side php. that mean no third language require in between server and client.
uttam
No, why would you need another language? (You need to transport the data, but that is just HTTP)
David Dorward
ok, thanks david
uttam
is there any ebook or link you have by which i can understand the concept of the server side programing .
uttam
A: 

JSON is a very simple and straight-forward format, so in case your data model is also simple, you could just use plain echo() or printf() statements on your server to generate the JSON output.

Claus Broch
A: 

You probably mean that you want to encode something on the server side as JSON. Take a look at json_encode: http://php.net/manual/en/function.json-encode.php

tmadsen