Hello,
I'm new to php and am working through some examples in a book I've got. I'm trying to write to a file which works fine, my problem is at the end of each line I'm using \n but it isn't working. Instead I get a little square and the text carries on:
my code is:
$outputstring = $date."\t".$tireqty." tires \t".$oilqty." oil\t" .$sparkqty." spark plugs\t\£".$totalamount ."\t". $address."\n";
Please can someone help?
\n is a newline character - this is fine in linux based OS's
However, windows considers a newline as \r\n
Simply use \r\n to make it a newline in windows (carriage return, then line feed)
thanks. that's sorted it.