This problem has to do with the non-standarization of line breaks amongst unix, mac, and pc platforms. Usually \n will work, but to be absolutely positive, you can use \n\r.
annie wrote:
hi,
the code below allows me to write to txt file but all data are next to each other
this way:
details1|test.htmldetails2|test.html
how can make it write to txt file like this:
details1|test.html
details2|test.html
<?
$fp = fopen("c:\dir\test.txt", "wb");
while ($row = mysql_fetch_array ($rs)) {
$writefile = fputs($fp, $row["details"]."\n"."|".$row["link"]."\n");
}
mysql_free_result ($rs);
?>