Re: [SMARTY] backticks.

From: Date: Tue, 08 Jul 2003 13:51:06 +0000
Subject: Re: [SMARTY] backticks.
References: 1  Groups: php.smarty.general 
Request: Send a blank email to php-smarty-general+get-9849@lists.php.net to get a copy of this message
On Tue, Jul 08, 2003 at 03:05:14PM +0200, Florian Winkler wrote: > Can anybody explain what backticks are good for ? > I don't understand the docku. backticks are used to embed variables into string-constants. for example: $foo = array("BAR"=>"value-of-bar") $bar = "BAR"; and in the template: {assign var=target value="... $foo.$bar ..."} this will assign the (maybe not wanted) value: "... Array.BAR ..." to override the precedence, use backticks: {assign var=target value="... $foo.$bar ..."} this will lead to: "... value-of-bar ..." for simple cases (just "$foo", without any dereference) backticks are not needed inside double-quotes. HTH messju

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