Re: [SMARTY] How I do this?

From: Date: Sat, 12 Mar 2005 02:41:28 +0000
Subject: Re: [SMARTY] How I do this?
References: 1  Groups: php.smarty.general 
Request: Send a blank email to php-smarty-general+get-12315@lists.php.net to get a copy of this message
Sort your resultset on IDC. Store the 'current IDC' in a variable in your loop (initialized it to something bogus, like -1). Do something like this (pseudocode): (this is in a loop, looping over the $data array, which is your database data) if $currentIDC != $data['IDC'] then $currentIDC = $data['IDC'] print catagory header table row end if print forum table row (end loop) this way, you print the forum table row always, and precede it with a category header row if and only if the category has changed. Good Luck, On Sat, 12 Mar 2005 03:01:15 +0100 (CET), Reynier Pérez Mira <reynierpm@yahoo.es> wrote: > Well the question is if I have a table formed in this way: -- Matt Warden Miami University Oxford, OH, USA http://mattwarden.com This email proudly and graciously contributes to entropy.

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