At 03:31 PM 4/8/2002 +0200, Alberto. Sartori wrote: >You should do the cicle and get the datas until you reach the end of file >aka feof($fp) or better, try to use fread()
Yup, good point. Here's the modified code.. not using fread() though. For non-binary data I think this should work ok though. <?php $fp = fopen ("album.dat","r"); while (!feof($fp)) { $data = fgets($fp) $values = explode(';', $data); list($vignette, $photo, $marque, $nom, $pdfproduit, $commprod) = $values; print("<tr>"); print("<td>$vignette</td>"); print("<td><img src=\"images/$photo\"><a href=\"prod.php?file=lecteur.dat\"></a></td>"); print("<td>$marque</td>"); print("<td>$nom</td>"); print("<td>$pdfproduit</td>"); print("<td>$commprod</td>"); print("</tr>"); } fclose($fp); ?> -- PHP Windows Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php