Hi,
I seam to have a problem deleting lines fron a textfile ... Here is my code:
$fp = fopen("test.txt", "r+");
$in = "4";
while(!feof($fp)){
if(fgetss($fp, 10) == $in."\r\n"){
fwrite($fp, " ");
}
}
fclose($fp);
Lets say my textfile looks like this:
1
2
3
4
5
6
7
8
9
My code will replace the nr 5 in the file with " "... I need it to drop the line "4".. and make it look like this:
1
2
3
5
6
7
8
9
Ideas? 🙂