PHP Classes

File: htdocs/xoops_lib/vendor/smarty/smarty/docs/designers/language-variables/index.md

Recommend this page to a friend!
  Packages of Michael Beck   Xoops 2.5   htdocs/xoops_lib/vendor/smarty/smarty/docs/designers/language-variables/index.md   Download  
File: htdocs/xoops_lib/vendor/smarty/smarty/docs/designers/language-variables/index.md
Role: Auxiliary data
Content type: text/markdown
Description: Auxiliary data
Class: Xoops 2.5
Modular content management publication system
Author: By
Last change:
Date: 2 months ago
Size: 1,169 bytes
 

Contents

Class file image Download

Variables

Smarty has several types of variables. The type of the variable depends on what symbol it is prefixed or enclosed within.

Variables in Smarty can be either displayed directly or used as arguments for functions, attributes and modifiers, inside conditional expressions, etc. To print a variable, simply enclose it in the delimiters so that it is the only thing contained between them.

{$Name}

{$product.part_no} <b>{$product.description}</b>

{$Contacts[row].Phone}

<body bgcolor="{#bgcolor#}">

Scopes

You can assign variables to specific variable scopes.

  

> Note > > An easy way to examine assigned Smarty variables is with the > debugging console.