RE: [PHP] object literals

From: Date: Fri, 01 May 2009 15:40:11 +0000
Subject: RE: [PHP] object literals
References: 1 2  Groups: php.general 
Request: Send a blank email to php-general+get-292195@lists.php.net to get a copy of this message
On Fri, 2009-05-01 at 17:36 +0200, Andrea Giammarchi wrote: > var o = { > "a" : "b", > "c" : "d" > }; > > $o = array( > 'a' => "b", > 'c' => "d" > ); > > so I guess the problem is a couple of quotes, isn't it? > > > otherwise define object statically and externally and use json_decode ;-) You made an array-- not an object. Cheers, Rob. -- http://www.interjinn.com Application and Templating Framework for PHP

« previous php.general (#292195) next »