Variables: Variabel yang ditempatkan dari PHP

Assigned variables that are referenced by preceding them with a dollar ($) sign.


 * Kode PHP


 * Kode index.tpl:


 * Kode di atas akan menghasilkan:

Associative arrays
You can also reference associative array variables by specifying the key after a dot "." symbol.

Contoh Accessing associative array variables
index.tpl source:

this will output:

Array indexes
You can reference arrays by their index, much like native PHP syntax.

Contoh Accessing arrays by index
index.tpl source:

This will output:

Objects
Properties of objects assigned from PHP can be referenced by specifying the property name after the -> symbol.

Contoh Accessing object properties
this will output:

Sumber
https://www.smarty.net/docs/en/language.variables.tpl#language.assigned.variables