RE: [SMARTY] "Variable substitution"

From: Date: Thu, 03 Mar 2005 14:46:16 +0000
Subject: RE: [SMARTY] "Variable substitution"
References: 1  Groups: php.smarty.general 
Request: Send a blank email to php-smarty-general+get-12292@lists.php.net to get a copy of this message
A thought I got directly after posting... Maybe it's better to use an array for this kind?! > -----Original Message----- > From: Mattias Hallström [mailto:di98mha@student.bth.se] > Sent: den 3 mars 2005 15:36 > To: smarty-general@lists.php.net > Subject: [SMARTY] "Variable substitution" > > Hi everyone, > > > > I am trying to get the value of a smarty variable by generating the > variable’s name, but I can’t figure out how to… > > > > I have variables named: $class1, $class2, $class3 etc. > > Then I have a {section} to get the numbers 1, 2, 3 etc > > > > {assign var="className" > value="class"$attributeNr} (attributeNr is > the > counter: 1,2,3…) > > > > Now I have “class1”, “class2” etc in className, but how do I display the > value of the variables $class1, $class2 etc? > > > > Best Regards, > > Mattias Hallström > > Problem.se – Intelligent Web Solutions Sweden

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