What are some advantages and disadvantages of using Smarty as a template system in PHP development?
Using Smarty as a template system in PHP development can help separate the presentation layer from the business logic, making the code more maintainable and easier to work with for designers and developers. However, it can also add an extra layer of complexity to the project and may require additional learning curve for those new to Smarty.
require_once('smarty/libs/Smarty.class.php');
$smarty = new Smarty();
$smarty->assign('name', 'John Doe');
$smarty->display('index.tpl');