Re: [SMARTY] how make for assign this
| From: | Ben | Date: | Wed, 07 May 2003 04:52:29 +0000 |
| Subject: | Re: [SMARTY] how make for assign this | ||
| References: | 1 | Groups: | php.smarty.general |
| Request: | Send a blank email to php-smarty-general+get-9488@lists.php.net to get a copy of this message | ||
why don't you leave this statements in php
and just assign it to smarty?
so afterwards you do
$tmpl = new Smarty;
$tmpl->assign("varname1", $resultat);
$tmpl->assign("varname2", $resultat1);
...
$tmpl->display("templatefile);
in the template
{section name="mysec" loop=$varname1}
put anything here,
get the vars eg. $varname1[mysec].name
if you want you can put a section in a section
eg.
{section name="mysec2" loop=$varname2}
...
{/section}
or just close the old section
{/section}
hope i could help you.
Ben
At 01:47 07.05.2003 +0200, you wrote:
>Hello smarty-general,
>
>i have in php this and i want transform in smarty :
>
>while ($resultat = mysql_fetch_array($res,MYSQL_ASSOC)) {
> ...
> while ($resultat1 = mysql_fetch_array($res1,MYSQL_ASSOC)) {
> ...
> }
>}
>
>i have test many things but i don't a good result
>--
>Cordialement,
>Elgi
>
>
>
>--
>Smarty General Mailing List (http://smarty.php.net/)
>To unsubscribe, visit: http://www.php.net/unsub.php
>
>
>
>---
>__________________________________________________________
>Checked by AVG anti-virus system (http://www.grisoft.com).
>Version: 6.0.476 / Virus Database: 273 - Release Date: 24.04.2003
___________________________________________________________________________
ICQ: 30595778
web: http://www.doubleBnet.de
http://www.disco-lifter.de
(Mitfahrgelegenheit für
Discos und Clubs)
http://gbuch.get-digital.de (Hol Dir
Dein kostenloses
Gästebuch)