Concat. variable+string as include file
| From: | Øystein Gisnås | Date: | Fri, 18 Oct 2002 22:07:57 +0000 |
| Subject: | Concat. variable+string as include file | ||
| Groups: | php.smarty.general | ||
| Request: | Send a blank email to php-smarty-general+get-6192@lists.php.net to get a copy of this message | ||
I want to do this:
{include file=$keyword".tpl"}
but has to do this:
{assign var="keyword" value=$keyword}
{include file=$keyword.".tpl"}
or at least use two lines. Besides that, this code is "ugly", since it
uses the "." as in arrays. Got a proper way to do this?