|
Smarty
WARNING: All discussion is moving to https://reddit.com/r/smarty, please go there! This forum will be closing soon. |
|
View previous topic :: View next topic |
Author |
Message |
TomGrill Smarty Rookie
Joined: 22 May 2003 Posts: 5
|
Posted: Mon May 26, 2003 7:53 am Post subject: block without array |
|
|
is it possible to make block without array
like this:
<?
$sql = mysql_query("SELECT * FROM `tab`");
while($res = mysql_fetch_Assoc($sql))
{
$smarty->set_block_or_the_name_of_a_function_i_dont_know();
}
?>
-> what i want is to set a block from PHPSCRIPT not from TEMPLATEFILE |
|
Back to top |
|
boots Administrator
Joined: 16 Apr 2003 Posts: 5611 Location: Toronto, Canada
|
Posted: Mon May 26, 2003 9:00 am Post subject: |
|
|
Hi.
What do you mean by block? A var in the template, like {$block}?
$smarty->assign ?? |
|
Back to top |
|
TomGrill Smarty Rookie
Joined: 22 May 2003 Posts: 5
|
Posted: Mon May 26, 2003 10:29 am Post subject: |
|
|
with block i mean a part in a template that repeats. |
|
Back to top |
|
TomGrill Smarty Rookie
Joined: 22 May 2003 Posts: 5
|
Posted: Mon May 26, 2003 11:56 am Post subject: |
|
|
well, what i searched for was append() |
|
Back to top |
|
Escariion Smarty Rookie
Joined: 14 May 2003 Posts: 7 Location: Berlin, Germany
|
Posted: Mon May 26, 2003 12:04 pm Post subject: |
|
|
hm so you are appending in the while-loop.
why is this better than assigning an array after loop ? |
|
Back to top |
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|