$smarty->assign('name', 'John'); $smarty->assign('age', 30);
$user_data = array( 'name' => 'John', 'age' => 30, 'location' => 'New York' ); $smarty->assign('user', $user_data);In this example, we are assigning an array of user data to a variable called `user`. This variable can then be used in the Smarty template to display the user's name, age, and location. Smarty is a PHP package library that can be installed using Composer. The package name is `smarty/smarty`.