

<?php if (!empty($news)): ?>
    <h2>Alle News</h2>
    <table>
        <thead>
        <tr>
            <th>Name</th>
            <th>Beschreibung</th>
            <th>Datum</th>
        </tr>
        </thead>
        <tbody>
        <?php foreach ($news as $item): ?>
            <tr>
                <td><?php echo htmlspecialchars($item['name']); ?></td>
                <td><?php echo nl2br(htmlspecialchars($item['description'])); ?></td>
                <td><?php echo date('d.m.Y', strtotime($item['date'])); ?></td>
            </tr>
        <?php endforeach; ?>
        </tbody>
    </table>
<?php else: ?>
    <p>Derzeit sind keine News verfügbar.</p>
<?php endif; ?>