Re: [SMARTY] Re: Variables in variables
| From: | k | Date: | Mon, 04 Nov 2002 16:56:34 +0000 |
| Subject: | Re: [SMARTY] Re: Variables in variables | ||
| References: | 1 2 | Groups: | php.smarty.general |
| Request: | Send a blank email to php-smarty-general+get-6323@lists.php.net to get a copy of this message | ||
> ... whereby $shop->data is an associative array that contains all my
> shop-data :). In $shop->data I have $shop->data["Shop_Name"] and
> $shop->data["Shop_FrontPage"]. Now the example, how I would think
> smarty should work, but doesnt.
...
> So if my data would be the following (pseudo code):
> Shop_Name = Test Shop
> Shop_FrontPage = Welcome to {$Shop_Name},<br> nice to meet you.
> I would expect that the {$Shop_Name} variable would be replaced by
> Test Shop, but instead it is left blank. The title is displayed
> correctly, so there is no problem with the variables.
Maybe use this:
Shop_FrontPage = "Welcome to ".$shop->data["Shop_Name"].", nice to
meet You.";
Don't mix up PHP ("logic") with Smarty (html creation).
k