I'm writing records out to a text file and i want each record to be a new line in my file so that it's easy to read.
How do i do this.
The sample below adds records ok but to the end of the previous line. ie no line breaks.
$entry = $jobno.$day.$cc.$operation.$opcode.$mins.$cmt
/ ------ write record to file ---------- /
$dokfile = substr($day,0,4).$opcode.".dok";
$filename = $drives[12].$dokfile;
$fd = fopen($filename, "a") or die("Unable to open $filename");
$fout = fwrite($fd, $entry);
fclose($fd);
/ ------- return to data entry ---------- /