Re: object literals
| From: | Richard Heyes | Date: | Fri, 01 May 2009 12:32:11 +0000 |
| Subject: | Re: object literals | ||
| References: | 1 2 3 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-292177@lists.php.net to get a copy of this message | ||
Hi,
> You could use JSON,
>
> $foo = json_decode('{"a":1,"b":3}');
>
> but I guess that's not much better than Richard's suggestion.
Didn't think of that (well... it's new). That's actually much better I
think, since you get the added boon of ease of portability to JS (if
that's even a factor).
--
Richard Heyes
HTML5 graphing: RGraph (www.rgraph.net)
PHP mail: RMail (www.phpguru.org/rmail)
PHP datagrid: RGrid (www.phpguru.org/rgrid)
PHP Template: RTemplate (www.phpguru.org/rtemplate)