1$person = array(
2 "name" => "Johny Carson",
3 "title" => "CTO"
4);
5$personJSON=json_encode($person);//returns JSON string
1$person = array(
2 "dim" => "2*2",
3 "coloris" => "rouge"
4);
5$personJSON=json_encode($person);//returns JSON string