note 71132 deleted from ref.json by bobby

From: Date: Mon, 13 Nov 2006 16:34:28 +0000
Subject: note 71132 deleted from ref.json by bobby
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-119676@lists.php.net to get a copy of this message
Note Submitter: Paul Wieland ---- I got excited when I saw that there was native JSON support built into PHP (I've been using an external class). Then I found out that the implementation is wrong. If you encode an indexed array you get an object back. Doh. <?php print_r( json_decode( json_encode( array('test1'=>'one','test2'=>'two') ) ) ); ?> Produces: stdClass Object ( [test1] => one [test2] => two )

« previous php.notes (#119676) next »