Re: [SMARTY] Variable in file name

From: Date: Mon, 24 Mar 2003 22:45:28 +0000
Subject: Re: [SMARTY] Variable in file name
References: 1  Groups: php.smarty.general 
Request: Send a blank email to php-smarty-general+get-8873@lists.php.net to get a copy of this message
hello, On Mon, Mar 24, 2003 at 02:07:53PM -0800, Martin Voelkening wrote: > Hi, > > I would like to substitute the 1 in: > > {config_load file="include_var_1.conf" scope="global"} > > with $customerID (the value of this variable was assigned in the > index.php). I have tried several versions but nothing works. How can > I do this? since 2.5.0-RC1 you can simply do {config_load file="include_var_$customerID.conf" scope="global"} in 2.4.2 and before you can work around with for example: {assign var=file value="include_var_%d.conf"|sprintf:$customerID} {config_load file=$file scope="global"} HTH messju

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