1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
24:
25:
26:
27:
28:
29:
30:
31:
|
<?php
$filename = 'news.xml';
if(file_exists($filename)) {
$xml = simplexml_load_file($filename);
if($xml) {
foreach($xml->news as $news) {
?>
<table>
<tr>
<td>Überschrift</td>
<td><?php echo $news->title ?></td>
</tr>
<tr>
<td></td>
<td><?php echo $news->description ?></td>
</tr>
<tr>
<td><?php echo date("H:i:s d.m.y", $news->date) ?></td>
<td><?php echo $news->author ?></td>
</tr>
</table>
<?php
}
} else {
echo ' <p>Die Datei names '. $filename .' konnte nicht geöffnet werden</p>';
}
}
?>
|