Appening value to tpl var

From: Date: Fri, 05 Jul 2002 01:39:35 +0000
Subject: Appening value to tpl var
References: 1  Groups: php.smarty.general 
Request: Send a blank email to php-smarty-general+get-5203@lists.php.net to get a copy of this message
i tried to use the append method to append a template var $Name with "Fred". i expect smarty will generate a template var called $NameFred, but it doesn't. please advise. my template file: t.tpl ----------------------- test<br> {$Name}<br> my php script ------------- <? require "Smarty.class.php"; $tpl = new Smarty; $tpl->append("Name","Fred"); $tpl->assign("NameFred","This is your name"); $tpl->display("t.tpl"); ?> and in templates_c ------------------ <?php /* Smarty version 2.0.1, created on 2002-07-05 09:31:14 compiled from t.tpl */ ?> test<br> <?php echo $this->_tpl_vars['Name']; ?> <br> OUTPUT from browser: -------------------- test Array rgds. __________________________________________________ Do You Yahoo!? Sign up for SBC Yahoo! Dial - First Month Free http://sbc.yahoo.com

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