What are some best practices for designing and outputting news content in PHP using Smarty?

When designing and outputting news content in PHP using Smarty, it is important to separate the presentation layer from the business logic. This can be achieved by using Smarty templates to handle the HTML markup and PHP files to handle the data retrieval and processing. By following this best practice, it makes the code more maintainable and easier to debug.

// news.php
require_once('Smarty.class.php');

$smarty = new Smarty;
$smarty->template_dir = 'templates';
$smarty->compile_dir = 'templates_c';

$news = array(
    array('title' => 'Breaking News', 'content' => 'Lorem ipsum dolor sit amet, consectetur adipiscing elit.'),
    array('title' => 'Latest Updates', 'content' => 'Sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.')
);

$smarty->assign('news', $news);
$smarty->display('news.tpl');
```

```html
<!-- news.tpl -->
<!DOCTYPE html>
<html>
<head>
    <title>News</title>
</head>
<body>
    <h1>News</h1>
    {foreach $news as $article}
        <h2>{$article.title}</h2>
        <p>{$article.content}</p>
    {/foreach}
</body>
</html>