<?
$line = "1";
$file = "haha.txt";

function remline($line, $file) {
	$data = file($file);
	$open = fopen($file, 'w');
	for ($i=0; $i<=count($data)-1; $i++) if ($i != $line) { fwrite($open,$data[$i]); }
	fclose($open);
}

remline("1",$file);

?>
Published in: PHP
Download

Related snippets