smarty php

Solutions on MaxInterview for smarty php by the best coders in the world

showing results for - "smarty php"
Alex
30 Apr 2017
1{* this template includes a {php} block that assign's the variable $varX *}
2{php}
3   global $foo, $bar;
4   if($foo == $bar){
5     echo 'This will be sent to browser';
6   }
7  // assign a variable to Smarty
8  $this->assign('varX','Toffee');
9{/php}
10{* output the variable *}
11<strong>{$varX}</strong> is my fav ice cream :-)
12
Montserrat
17 Nov 2017
1
2{php}
3   // including a php script directly from the template.
4   include('/path/to/display_weather.php');
5{/php}
6
7