Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PHP

smarty assign var

{assign var="name" value="Bob"}
{assign "name" "Bob"} {* short-hand *}

The value of $name is {$name}.


{* Other cool examples *}
{foreach $videos as $video}
   {$video.title_ns = {$video.title|lower|replace:' ':'-'}}
{/foreach}

{assign var="name" value="somestring_{$item.id}"} 
Source by www.smarty.net #
 
PREVIOUS NEXT
Tagged: #smarty #assign #var
ADD COMMENT
Topic
Name
4+1 =