Hrm... stumped.

From: Date: Tue, 13 Mar 2001 01:48:48 +0000
Subject: Hrm... stumped.
Groups: php.smarty.general 
Request: Send a blank email to php-smarty-general+get-382@lists.php.net to get a copy of this message
Hey all, I've got myself stumped here, and I wanted to see if anyone else can help me out, perhaps. I'm attempting to write a hierarchical explorer-like view with Smarty, and I'm having some issues. Given the following dataset: ID SUBJECT PARENT_ID ---------------------------------------------------------- 1 Test1 0 2 Test2 1 3 Test3 2 4 Test4 0 5 Test5 4 6 Test6 4 I'm wanting to create something like: + Test1 + Test2 + Test3 + Test4 + Test5 + Test6 Normally, I can handle this recursive by first grabbing the parent items, and then recursing down the childs, query for it's childs along the way. But, with Smarty I've happened across an interesting predicament, because (if I'm correct) I need to be able to preload a datastructure in a manageable format that I'm able to script out the layout in the template. I appreciate the help! TIA, -Jason

« previous php.smarty.general (#382) next »