sasori Posted August 2, 2008 Share Posted August 2, 2008 i don't know how to display the output in a vertical manner using this code of mine <?php $today = date('F d Y'); $fh = fopen('file.txt','a+'); fwrite($fh ,"$today\n"); fclose($fh); ?> the output produces, August 2 2008August 2 2008August 2 2008August 20008 <-- and so on, and so forth.. the "\n" seems that it doesn't work at all , Link to comment https://forums.phpfreaks.com/topic/117821-solved-php-help/ Share on other sites More sharing options...
toivo Posted August 2, 2008 Share Posted August 2, 2008 Have you tried '\r\n', which produces carriage return, line feed? Link to comment https://forums.phpfreaks.com/topic/117821-solved-php-help/#findComment-606019 Share on other sites More sharing options...
JasonLewis Posted August 2, 2008 Share Posted August 2, 2008 Just a note, Notepad doesn't show Linux/Unix line breaks correctly, try opening in Wordpad or some other application. Link to comment https://forums.phpfreaks.com/topic/117821-solved-php-help/#findComment-606020 Share on other sites More sharing options...
sasori Posted August 2, 2008 Author Share Posted August 2, 2008 Have you tried '\r\n', which produces carriage return, line feed? thanks buddy, it's working now Link to comment https://forums.phpfreaks.com/topic/117821-solved-php-help/#findComment-606021 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.