Really? I find this muuuuch easier, only one line of code:
file_put_contents($filename, str_replace($line . "\r\n", "", file_get_contents($filename)));
Really? I find this muuuuch easier, only one line of code:
file_put_contents($filename, str_replace($line . "\r\n", "", file_get_contents($filename)));