Using smarty to collect data in a php loop

From: Date: Sat, 27 Apr 2002 05:06:43 +0000
Subject: Using smarty to collect data in a php loop
Groups: php.smarty.general 
Request: Send a blank email to php-smarty-general+get-3905@lists.php.net to get a copy of this message
Please forgive me. Im a bit new to smarty... Im wondering about looping through some database results to collect data for smarty. while ($row = mysql_fetch_row($sql)) { $foo = $row[0]; } Is it possible to then pass $foo to $smarty like so $smarty->assign("bar", $foo); where $foo is a numeric array?? And then run a foreach or the like on the array in the template. Thanks for listening...

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