Re: Arrays in Smarty

From: Date: Sun, 24 Aug 2003 07:11:09 +0000
Subject: Re: Arrays in Smarty
References: 1  Groups: php.smarty.dev 
Request: Send a blank email to php-smarty-dev+get-1804@lists.php.net to get a copy of this message
Nevermind - Wrong group and found the answer. Sorry. "Liz Fulghum" <efulghum@inter-tek.net> wrote in message news:20030824060838.27667.qmail@pb1.pair.com... > Hi there - > > I'm having a bit of trouble with arrays in smarty and what hoping someone > could help. > > In my php file I have an array called $picks filled and assigned to a smarty > variable. > > In my template, I'm using cycle to loop through some html code: > > {section name=i loop=$matches} > <tr> > <td><input type="radio" name="pick[{$matches[i].id}]" > value="1"{if > $picks.[$matches[i].id]==1} SELECTED{/if} > ><b>{$matches[i].team1}</b></td></tr> > {/section} > > I need to get the value of $pick['x'], where 'x' is equal to the value of > $matches[i].id > > But the syntax above does not seem to be valid, and the other things I've > tried aren't working either. > > Anyone know a way to do this? > > TYIA.

« previous php.smarty.dev (#1804) next »