Re: [SMARTY] Append a String

From: Date: Wed, 16 Jul 2003 08:39:51 +0000
Subject: Re: [SMARTY] Append a String
References: 1  Groups: php.smarty.general 
Request: Send a blank email to php-smarty-general+get-9899@lists.php.net to get a copy of this message
On Tue, Jul 15, 2003 at 10:28:10PM -0700, Balaji Nallathambi wrote: > Hi all, > I want to assign an variable in my tpl file which I can do it by > {assign var="ProjectID" value="ProjectID"} > but I want the value to be generated ,means I need to append an value with the value I assigned > > i.e ProjectID will be ProjectID1,ProjectID2 ....... ProjectIDN; > I don't know how to append an value to the existing one like > ProjectID + "1" = ProjectID1; simply do: {assign var="ProjectID" value="ProjectID$variable"} for more complex variables inside quotes see backticks at: http://smarty.php.net/manual/en/language.syntax.quotes.php to generate the sequence 1,2,3... see: http://smarty.php.net/manual/en/language.function.counter.php greetings messju > Let me know what I need to do as soon as I can ... > I need to work every thing in my template file. > Advance thanks > Balaji.N

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