I've got this bit of code which reads a file in, then goes through it line by line.
If there is a match in the line a value is updated :
$filePath = $_REQUEST['fn'];
$lines = file();
foreach ($lines as $line_num => $line)
{
if(stristr($line,'Device') && stristr($line,'A=0FEDFA')) $line = str_replace ("ID=\"", "ID=\"***",$line);
if(stristr($line,'Style')) $line = str_replace ("ID=\"", "ID=\"***",$line);
}
The how do I save this back as $filePath ?
Thanks