Re: Thinking out loud - a continuation...
| From: | Jay Blanchard | Date: | Sat, 24 Mar 2012 17:09:54 +0000 |
| Subject: | Re: Thinking out loud - a continuation... | ||
| References: | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-317251@lists.php.net to get a copy of this message | ||
[snip]The crux of it is:
>
> $focus = &$focus[$name];
> [/snip]
It works as I expect so far. All I have to do is figure out how to make the element a name: element
in the JSON. for instance an element would look like this
{
name: "Bob",
children: []
}
So the PHP array would have to look like this -
$json = array (
name => "Bob",
children => array (
name => "Angie"
)
)
and so on. This is for one of the services that will consume the JSON.