I have this simple program that print the content of a file
<?php
$fp=fopen("../resources/client.txt","r");
$trouve=0;
$cnt=0;
while(!feof($fp)){
$i=0;
$cnt++;
echo "<br>";
$ligne=fgets($fp);
$row=explode("|",$ligne);
while($i<=2){
echo $row[$i]."|";
$i++;}
}
fclose($fp); ?>
It does the job but after displaying i get also these errors:
Is there a simpe solution for this problem? Thank you all in advance.
On en empty line you have no
$row[1]
neither nor$row[2]