|
Posted by Panu on 04/06/05 15:56
Reynier Pérez Mira wrote:
> Can you explain a little more?? I not understand. I'm
> new in the world of Smarty.
instead of:
while($row = $evenres->fetchRow()){
array_push($titulo,$row[1]);
array_push($descripcion,$row[2]);
array_push($contenido,$row[3]);
$template->assign("titArr",$titulo);
$template->assign("descArr",$contenido);
$template->assign("conArr",$descripcion);
}
use:
while($row = $evenres->fetchRow()){
array_push($titulo,$row[1]);
array_push($descripcion,$row[2]);
array_push($contenido,$row[3]);
}
$template->assign("titArr",$titulo);
$template->assign("descArr",$contenido);
$template->assign("conArr",$descripcion);
addionally the name attribute in the section is the index so:
instead of
{section name=titulo loop=$titArr}
<tr>
<td width="3%" valign="top" class="tddoted"
align="center"><strong>{$smarty.section.eventos.rownum}.</strong></td>
<td width="97%" class="padding-td
tddoted">{$evenArr[eventos]}</td>
use:
{section name=titulo loop=$titArr}
<tr>
<td width="3%" valign="top" class="tddoted"
align="center"><strong>{$smarty.section.titulo.index}.</strong></td>
<td width="97%" class="padding-td tddoted">{$evenArr[titulo]}</td>
--
http://www.xs4all.nl/~hanb/documents/quotingguide.html
[Back to original message]
|