Using smarty variables inside {php} {/php} blocks

From: Date: Wed, 04 Sep 2002 20:31:59 +0000
Subject: Using smarty variables inside {php} {/php} blocks
Groups: php.smarty.general 
Request: Send a blank email to php-smarty-general+get-5926@lists.php.net to get a copy of this message
So, I think I may have had this working at one point, but now whenever I try it things go wrong. Example: Foo.php: ------------------ <?php #my smarty is an innocent subclass that simply sets directories require_once 'my_smarty.inc'; $smarty= new My_Smarty(); $smarty->assign('bar', 'I want to be displayed'); $smarty->display('foo.tpl'); ?> Foo.tpl: ------------------ <html> <body> <!-- random code--> Displayed via smarty: {$bar} <br> Displayed via php: {php} $bar {$bar} {/php} </body> </html>

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