Hallo,
ich möchte eine bestimmte einzelne Zeile aus einer csv Datei auslesen.
Im Moment zeigt er mir die ersten beiden Zeilen.
Wie kann ich zum Bsp. nur die Zeile 5 anspringen?
Gruß
<table border="0" rules="groups">
<?php
$handle = fopen("urlaub.csv", "r");
$i = 0;
while(($data = fgetcsv($handle, 150, ";")) && $i < 2)
{
echo "<tr>";
echo "<td width=\"300px\">". $data[0]."</td>";
echo "<td width=\"25px\">". $data[1]."</td>";
echo "<td width=\"25px\">". $data[2]."</td>";
echo "<td width=\"25px\">". $data[3]."</td>";
echo "<td width=\"25px\">". $data[4]."</td>";
echo "<td width=\"25px\">". $data[5]."</td>";
echo "<td width=\"25px\">". $data[6]."</td>";
echo "<td width=\"25px\">". $data[7]."</td>";
echo "<td width=\"25px\">". $data[8]."</td>";
echo "<td width=\"25px\">". $data[9]."</td>";
echo "<td width=\"25px\">". $data[10]."</td>";
echo "<td width=\"25px\">". $data[11]."</td>";
echo "<td width=\"25px\">". $data[12]."</td>";
echo "<td width=\"25px\">". $data[13]."</td>";
echo "<td width=\"25px\">". $data[14]."</td>";
echo "<td width=\"25px\">". $data[15]."</td>";
echo "<td width=\"25px\">". $data[16]."</td>";
echo "<td width=\"25px\">". $data[17]."</td>";
echo "<td width=\"25px\">". $data[18]."</td>";
echo "<td width=\"25px\">". $data[19]."</td>";
echo "<td width=\"25px\">". $data[20]."</td>";
echo "<td width=\"25px\">". $data[21]."</td>";
echo "<td width=\"25px\">". $data[22]."</td>";
echo "<td width=\"25px\">". $data[23]."</td>";
echo "<td width=\"25px\">". $data[24]."</td>";
echo "<td width=\"25px\">". $data[25]."</td>";
echo "<td width=\"25px\">". $data[26]."</td>";
echo "<td width=\"25px\">". $data[27]."</td>";
echo "<td width=\"25px\">". $data[28]."</td>";
echo "<td width=\"25px\">". $data[29]."</td>";
echo "<td width=\"25px\">". $data[30]."</td>";
echo "<td width=\"25px\">". $data[31]."</td>";
echo "</tr>";
$i ++;
}
fclose($handle);
?>
</table>