Re: [SMARTY] The infamous loop problem

From: Date: Fri, 22 Nov 2002 14:49:22 +0000
Subject: Re: [SMARTY] The infamous loop problem
References: 1 2 3 4 5  Groups: php.smarty.general 
Request: Send a blank email to php-smarty-general+get-6512@lists.php.net to get a copy of this message
I get an error: "Missing name parameter" ----- Original Message ----- From: "Monte Ohrt" <monte@ispi.net> To: "Garland Foster" <garland_foster@salutia.com> Cc: <smarty-general@lists.php.net> Sent: Friday, November 22, 2002 11:30 AM Subject: Re: [SMARTY] The infamous loop problem > {section loop=$rating} > <img src="star.gif"> > {/section} > > On Fri, 2002-11-22 at 08:18, Garland Foster wrote: > > Hello All, > > > > Please let me know the best approach to this simple problem: > > > > I have "rated" articles in my system and I want to display "n" stars > > depending on the rating. For example if rating=5 I want to display 5 stars. > > The stars are simple images star.gif > > How can I do this, assuming I have $rating as a template variable? > > Is there a way to loop from 1 to $rating ? > > > > Thanks a lot. > > Garland > > > -- > Monte Ohrt <monte@ispi.net> > >

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