Hi all,
Can anyone help me with this one ? In the code below I'm renaming a specific email address in a textfile. It works, but the linebreaks are gone. The file_read_contents() command kills all of them when I write it to the file. Is there a possibility to keep them ?
$renamingMail = ....// some name
$renString = file_get_contents ($reader);
$search = preg_replace("/$renamingMail/", $_POST['newmail'], $renString);
$fp = fopen($reader, "w+");
fwrite($fp, $search);
fclose($fp);
Oliver