Es funktioniert, wenn ich es so mache:
<body text="#000000" bgcolor="#FFFFFF" link="#FF0000" alink="#FF0000" vlink="#FF0000">
<div align="center">
<img src="header.gif" width="399" height="40" border="0" alt="">
<br><br>
<table class="sample" cellspacing="0" cellpadding="0">
<?php include("zufall.php"); ?>
</table>
</div>
</body>
<?php
$input = array("<img src=\"001.gif\">", "002.gif", "003.gif", "004.gif", "005.gif", "006.gif", "007.gif", "008.gif", "009.gif", "010.gif", "011.gif", "012.gif", "013.gif", "014.gif", "015.gif", "016.gif", "017.gif", "018.gif", "019.gif", "020.gif", "021.gif", "022.gif", "023.gif", "024.gif", "025.gif", "026.gif");
$rand_keys = array_rand($input, 25); ?>
<tr>
<td><?php echo $input[$rand_keys[0]] . "\n";?></td>
<td><?php echo $input[$rand_keys[1]] . "\n";?></td>
<td><?php echo $input[$rand_keys[2]] . "\n";?></td>
<td><?php echo $input[$rand_keys[3]] . "\n";?></td>
<td><?php echo $input[$rand_keys[4]] . "\n";?></td>
</tr>
<tr>
<td><?php echo $input[$rand_keys[5]] . "\n";?></td>
<td><?php echo $input[$rand_keys[6]] . "\n";?></td>
<td><?php echo $input[$rand_keys[7]] . "\n";?></td>
<td><?php echo $input[$rand_keys[8]] . "\n";?></td>
<td><?php echo $input[$rand_keys[9]] . "\n";?></td>
</tr>
<tr>
<td><?php echo $input[$rand_keys[10]] . "\n";?></td>
<td><?php echo $input[$rand_keys[11]] . "\n";?></td>
<td><?php echo $input[$rand_keys[12]] . "\n";?></td>
<td><?php echo $input[$rand_keys[13]] . "\n";?></td>
<td><?php echo $input[$rand_keys[14]] . "\n";?></td>
</tr>
<tr>
<td><?php echo $input[$rand_keys[15]] . "\n";?></td>
<td><?php echo $input[$rand_keys[16]] . "\n";?></td>
<td><?php echo $input[$rand_keys[17]] . "\n";?></td>
<td><?php echo $input[$rand_keys[18]] . "\n";?></td>
<td><?php echo $input[$rand_keys[19]] . "\n";?></td>
</tr>
<tr>
<td><?php echo $input[$rand_keys[20]] . "\n";?></td>
<td><?php echo $input[$rand_keys[21]] . "\n";?></td>
<td><?php echo $input[$rand_keys[22]] . "\n";?></td>
<td><?php echo $input[$rand_keys[23]] . "\n";?></td>
<td><?php echo $input[$rand_keys[24]] . "\n";?></td>
</tr>
Danke an alle, die mitgeholfen haben!