Hi,
I'm getting mad with this one. I get my contents replace a special one, selected via checkbox and write it back to the file. The replaced content's \n (new line), which should be actually in the textfile. I just replace the content not the \n's before and after it, but they're gone. Can anyone help me on this ?
$reader = "emails.txt";
$mails = file($reader);
for($i=0; $i<count($mails); $i++)
{
print "<input type=checkbox name=semails[$i] value=>$mails[$i]"."<br>";
}
$renString = file_get_contents ($reader);
$search = str_replace($renamingMail, $_POST['newmail'], $renString);
$fp = fopen($reader, "w+");
fwrite($fp, $search);
fclose($fp);
thanx in advance
Olli