Re: Thinking out loud - a continuation...

From: Date: Mon, 26 Mar 2012 23:05:09 +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-317287@lists.php.net to get a copy of this message
[snip] On Mar 26, 2012, at 5:58 PM, Robert Cummings wrote: > On 12-03-26 06:52 PM, Jay Blanchard wrote: >> [snip] >>> Did you end up with a satisfactory output? It's not overly difficult to generate >>> an array instead of an object. >> [/snip] >> >> I did for all but this one instance. Are you saying that it would be easy to make of the >> children arrays? I thought they were already - am I missing something? > > They are arrays... but JSON_encode is creating objects. You can create arrays by traversing the > array structure recursively and outputing your own JavaScript code to build a JavaScript array. I > don't know if that would serve the purpose, but you would end up with an array. [/snip] I'm listening - so could this be added to the code that you just wrote? Or do I need to recurse the output from json_encode()?

« previous php.general (#317287) next »