Re: [SMARTY] Help with array indexes in if statement

From: Date: Tue, 13 Aug 2002 16:56:38 +0000
Subject: Re: [SMARTY] Help with array indexes in if statement
References: 1  Groups: php.smarty.general 
Request: Send a blank email to php-smarty-general+get-5688@lists.php.net to get a copy of this message
> Date: Tue, 13 Aug 2002 09:18:58 -0700 > To: smarty-general@lists.php.net > From: Online Editor <online@dailynexus.com> > Subject: [SMARTY] Help with array indexes in if statement > > Hello, > > I have any array that looks like this: > > $array_name[index].some_info > > I'd like to use an if statement is to check if "some_info" of the last > index in the array is empty or not. > > Ex. > {if $array_name[last].some_info != ""} > Do something > {/if} > > The problem, however, is I don't believe there is a "last" option when > dealing with {section loop=$VAR name=foo} ... {if $smarty.section.foo.last} {if $VAR[foo].some_info != ''} ... {/if} {/if} {/section} -- FreeBSD 4.6-STABLE 6:54PM up 4 days, 6:49, 14 users, load averages: 0.00, 0.00, 0.00

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