I guys I'm wondering how to delete a row from a txt file, what I was trying is something like this:
<?php
$file="test.txt";
$lines=file($file);
unset($lines[4]); //delete line 4 from file.txt
$fp = fopen('$file', 'w');
$fw = fwrite($fp, implode('', $lines));
fclose($fp);
?>
and this is my test.txt
Hello world
Bye world
GN world
GE world
SE world
This is my World
But I just can't delete nothing 🙁 any ideas about how to do this ?