'My Website', 'body' => 'Welcome to my website!' ); $template = new \Some\Package\Template(); $template->loadFile('template.php', $templateData);
array( 'Item 1', 'Item 2', 'Item 3' ) ); $template = new \Some\Package\Template(); $template->loadFile('list.php', $templateData);In this example, we load a template file called `list.php` and pass in an associative array of data with the key `items`, which contains an array of strings. The `loadFile()` function then uses a loop to iterate through the array and outputs each item as a list item. The package library used in these examples is not specified in the code, but it is assumed that there is some kind of Template class available in the specified package.