How to Write Json in PHP Posted in Polyglotbits on 09 of Sep, 2015

In PHP JSON stringify and parse are part of the core libraries - however in PHP they are called json_encode and json_decode respectively. The latter was shown in the post about parsing json in PHP.

$arr = array("name" => "Claus Witt", "ideas" => array("one idea", "another idea"));
$json = json_encode($arr);
echo $json;