Answers for "smarty php"

PHP
1

smarty php

{* this template includes a {php} block that assign's the variable $varX *}
{php}
   global $foo, $bar;
   if($foo == $bar){
     echo 'This will be sent to browser';
   }
  // assign a variable to Smarty
  $this->assign('varX','Toffee');
{/php}
{* output the variable *}
<strong>{$varX}</strong> is my fav ice cream :-)
Posted by: Guest on October-08-2020
0

{php} in smarty

{php}
   // including a php script directly from the template.
   include('/path/to/display_weather.php');
{/php}
Posted by: Guest on September-19-2021

Browse Popular Code Answers by Language