Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PHP

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 :-)
Source by www.smarty.net #
 
PREVIOUS NEXT
Tagged: #smarty #php
ADD COMMENT
Topic
Name
6+1 =