How can a template system like Tiny-Template improve the organization of PHP code?

Using a template system like Tiny-Template can improve the organization of PHP code by separating the presentation layer from the business logic. This allows developers to focus on writing clean and maintainable code without mixing HTML and PHP logic. Templates make it easier to update the design of a website without touching the underlying PHP code.

<?php
require_once 'TinyTemplate.php';

$template = new TinyTemplate();
$template->assign('title', 'Welcome to my website');
$template->assign('content', 'This is the content of the page');

$template->render('template.php');
?>