What best practices should be followed when creating and using templates in PHP?

When creating and using templates in PHP, it is important to follow best practices to ensure maintainability and readability of your code. This includes separating your HTML markup from your PHP logic, using a templating engine like Twig or Blade for more complex templates, and organizing your templates into separate files for reusability.

```php
// Example of using a simple template in PHP

// Define variables to be used in the template
$name = "John Doe";
$age = 30;

// Include the template file
include 'template.php';
```

In the `template.php` file, you can then use PHP variables like `$name` and `$age` to display dynamic content within your HTML markup.