hab es geschaft danke:
PHP Code:
<?php
//befüllen wir mal einen Array
$kom[]="test";
$kom[]="fdsa";
$kom[]="gghhg";
$i = 0;
foreach(glob('./voksfestfliegen20061908_loisl_sepp*.jpg') as $key => $file)
{
echo $i;
if ($i % 2 == 0)
{
echo "<table width='100%' border='0'>";
echo "
<tr>
<td><img src='$file' border='0'></td>
<td width='100'>Bild Nr. $key</td>
<td width='50%'><div align='center'>".$kom[$key]."</div></td>
</tr>";
echo "</table>";
$i=$i+1;
}
else
{
echo "<table width='100%' border='0'>";
echo "
<tr>
<td width='50%'><div align='center'>".$kom[$key]."</div></td>
<td width='100'>Bild Nr. $key</td>
<td><div align='right'><img src='$file' border='0'></div></td>
</tr>";
echo "</table>";
$i=$i-1;
}
}
?>
Leave a comment: