Re: Output of MySQl sorted query to text or Word file.

From: Date: Fri, 06 Dec 2002 16:25:22 +0000
Subject: Re: Output of MySQl sorted query to text or Word file.
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-127274@lists.php.net to get a copy of this message
ed@home.homes2see.com wrote:
What do I need to use to create real linefeeds or new lines when viewing under windows? Unices use only the "newline" character (interpreted as "line feed" in dos/win), whereas dos/win uses "carriage return" and "line feed". So to get it to show right in e.g. NotePad change:
$newline = "\n"; to
$newline = "\r\n"; but this won't display correctly under unix. Preferably when in dos/win view the file with a text editor that understands both e.g. PFE (Programmers File Editor). However, I'd use the end of line sequence for the system (if any) that needs to have the file "human readable". There are the "dos2unix" and "unix2dos" programs in linux to convert between the two, if this helps. HTH Chris

« previous php.general (#127274) next »