Re: Newbie Question - Looping Over mySQL Result Sets

From: Date: Sun, 23 Dec 2001 16:10:21 +0000
Subject: Re: Newbie Question - Looping Over mySQL Result Sets
References: 1  Groups: php.smarty.general 
Request: Send a blank email to php-smarty-general+get-2379@lists.php.net to get a copy of this message
Hi Roy, Welcome to Smarty from me as well :-) > Thanks, Peter, that worked like a champ. Just had to change $KeyID to KeyID > in the template, and remove the "; after the <p> tag in the template as > well (since it appears that line termination in the section part is > unnecessary). > > Now, I can at least begin tweaking some of my existing pages into the > Smarty format and see how it goes. In addition you should have a look at the brand new foreach loop. This is the only way to loop associative arrays. > Am I correct in assuming that I can no longer just loop over the result > set, and instead I'll need to store the results in a multi-dimensional array? I thought about a callback function for a short moment. But this really makes no sense at all. > Thanks for the super-quick response...Merry Christmas to you too! cheers and Merry Christmas to you as well! Werner

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