Welcome Guest, Not a member yet? Register   Sign In
Logical Problem With category and sub-category
#26

[eluser]jedd[/eluser]
Oh, you do want n levels returned, huh? I was trying to interpret meaning from the code snippet you first published, which looked like an intent to just pull one generation deep.

Yeah, I think here, if you want to generate a potentially infinite-dimension array, you'd have to use two functions. I've done recursive-ish stuff with these kinds of thing before - but working upwards (so only one parent for a given level) within a single function.

The code at psoup .. wow .. that's quite something, isn't it. I wonder what style guide out there encouraged that guy to use uppercase for php operators.

Do you have an idea how you want the data to present (in the array) - and if so, please share (wrapped in code tags, and nice and narrow - not all spread out on one or two lines). The psoup snippet you posted is as good as any for demonstrating the logic - have you tried to write something like that in your model yet?


Messages In This Thread
Logical Problem With category and sub-category - by El Forum - 04-24-2009, 06:00 AM
Logical Problem With category and sub-category - by El Forum - 04-24-2009, 10:36 AM
Logical Problem With category and sub-category - by El Forum - 04-24-2009, 11:07 AM
Logical Problem With category and sub-category - by El Forum - 04-24-2009, 12:14 PM
Logical Problem With category and sub-category - by El Forum - 04-24-2009, 12:39 PM
Logical Problem With category and sub-category - by El Forum - 04-24-2009, 04:44 PM
Logical Problem With category and sub-category - by El Forum - 04-25-2009, 02:32 AM
Logical Problem With category and sub-category - by El Forum - 09-10-2009, 01:34 PM
Logical Problem With category and sub-category - by El Forum - 09-10-2009, 01:49 PM
Logical Problem With category and sub-category - by El Forum - 09-10-2009, 01:56 PM
Logical Problem With category and sub-category - by El Forum - 09-10-2009, 02:02 PM
Logical Problem With category and sub-category - by El Forum - 09-10-2009, 02:08 PM
Logical Problem With category and sub-category - by El Forum - 09-10-2009, 02:16 PM
Logical Problem With category and sub-category - by El Forum - 09-10-2009, 02:18 PM
Logical Problem With category and sub-category - by El Forum - 09-10-2009, 02:21 PM
Logical Problem With category and sub-category - by El Forum - 09-10-2009, 02:24 PM
Logical Problem With category and sub-category - by El Forum - 09-10-2009, 02:26 PM
Logical Problem With category and sub-category - by El Forum - 09-10-2009, 06:06 PM
Logical Problem With category and sub-category - by El Forum - 09-11-2009, 07:31 AM
Logical Problem With category and sub-category - by El Forum - 09-11-2009, 07:48 AM
Logical Problem With category and sub-category - by El Forum - 09-11-2009, 07:51 AM
Logical Problem With category and sub-category - by El Forum - 09-11-2009, 07:56 AM
Logical Problem With category and sub-category - by El Forum - 09-11-2009, 08:12 AM
Logical Problem With category and sub-category - by El Forum - 09-11-2009, 08:18 AM
Logical Problem With category and sub-category - by El Forum - 09-11-2009, 08:36 AM
Logical Problem With category and sub-category - by El Forum - 09-11-2009, 09:07 AM
Logical Problem With category and sub-category - by El Forum - 09-11-2009, 09:10 AM



Theme © iAndrew 2016 - Forum software by © MyBB