How do I get newline characters
Im tyring to output information to a file. I want to have a newline character at the end of each line so that the next string that is written to the file starts on the next line. I coded it as below but it didnt work, I get all the outputs on the same line with the \n in between each string. What did I do wrong?
$writefile1='Name:'.$name.' / Address:'.$address.'\n';
$writefile2='Question: '.$question.' submitted on '.$dte.'\n';
where $fp is the file that is opened for writing to.
"\n" is a newline
'\n' is not
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)