RE: object literals

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux