Re: Newlines in files

From: Date: Wed, 03 Oct 2001 17:52:50 +0000
Subject: Re: Newlines in files
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-69801@lists.php.net to get a copy of this message
big5ive@gmx.net (Big5ive) wrote: > My Code: > $PW_LIST="../config/pw.txt"; > $fp=fopen("$PW_LIST","a"); > fputs($fp,"$username=$pw\n"); > fclose($fp); > > This should make a newline after printing $username=$pw, shouldn't it!? > But it doesn't!!! after printing where? in a browser \n does NOT mean newline only on console and in file etc. if you print it in a browser use nl2br(); -- Henrik Hansen

« previous php.general (#69801) next »