Re: [SMARTY] Simple (I suppose..) Problem with section...

From: Date: Fri, 31 May 2002 09:44:15 +0000
Subject: Re: [SMARTY] Simple (I suppose..) Problem with section...
References: 1  Groups: php.smarty.general 
Request: Send a blank email to php-smarty-general+get-4477@lists.php.net to get a copy of this message
Try this... <HTML> <TITLE>Hello</TITLE> <BODY> {if (count($membri))} <TABLE> {section name=people loop=$membri} <TR><TD>{$membri[people].nome}</TD><TD>{$membri[people].email}</TD></TR> {/section} </TABLE> {else} Nessun membro è stato definito {/if} <p> Ci sono {$smarty.section.people.loop} membri nel database. </BODY> </HTML> Hope I understand your problem right... :) > My problem is that when the "people" section is empty.. the message "Nessun > membro è stato definito" is diplayed between the <TABLE></TABLE>... Instead > I would like that the <TABLE></TABLE> will be used only if there are members > to display in the table rows... > And the "No members ..." message should not be in the <TABLE></TABLE>.. > > I hope to have explained what I'm trying to explain... :-P > > Thank you. > > > -- > Smarty General Mailing List (http://smarty.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php

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