Re: Deleting a line from a text file
Posted by:
banditoz
Date: July 22, 2005 04:35PM
//open same file and use "w" to clear file
$f=fopen($database,"w");
$fc=file($database);
//loop through array using foreach
foreach($fc as $line)
{
if ($line==25) //look if each line's 25
fputs($f,$line);
//place $line back in file
}
fclose($f);
byee
Subject
Written By
Posted
Re: Deleting a line from a text file
July 22, 2005 04:35PM
Sorry, you can't reply to this topic. It has been closed.
Content reproduced on this site is the property of the respective copyright holders.
It is not reviewed in advance by Oracle and does not necessarily represent the opinion
of Oracle or any other party.