assign('name', 'John'); $smarty->display('hello.tpl'); ?>In this example, we first include the Smarty library and then create a new instance of the smarty class. After that, we assign the value “John” to the variable “name.” This assigned value is then displayed in the “hello.tpl” template using the display() method. Package Library: Smarty PHP Template Library https://www.smarty.net/