Re: Thinking out loud - a continuation...
| From: | Robert Cummings | Date: | Fri, 23 Mar 2012 19:32:06 +0000 |
| Subject: | Re: Thinking out loud - a continuation... | ||
| References: | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-317233@lists.php.net to get a copy of this message | ||
On 12-03-23 03:28 PM, Jay Blanchard wrote:
On Mar 23, 2012, at 2:25 PM, Robert Cummings wrote:No, I'm performing assignment... intentionally. Parent's becomes the previous children to move down a level. The following:On 12-03-23 03:17 PM, Jay Blanchard wrote:I had it backwards. Both arrays are empty and the break should not occur because they are equal to each other. Let me send you a portion of the table Robert.[snip]I didn't actually test it... if you have trouble figuring out the problem feel free to send me a copy of your table (in private) and I'll debug :)[/snip] Update on my test. This works perfectly Robert - thank you very much! But there is one small problem that I am trouble-shooting: it only goes one layer and doesn't progress any further. I suspect it is on this section of code that I am going to add some stuff to to see what is happening. if( !($parents =&$children) ){$json = JSON_encode( $root );break; }
if( !($parents = &$children) )performs assignment and an empty array check in one statement. Cheers, Rob. -- E-Mail Disclaimer: Information contained in this message and any attached documents is considered confidential and legally protected. This message is intended solely for the addressee(s). Disclosure, copying, and distribution are prohibited unless authorized.