fwrite() blank-line Quirk?
| From: | Noel Wade | Date: | Sun, 22 Dec 2002 05:52:40 +0000 |
| Subject: | fwrite() blank-line Quirk? | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-129100@lists.php.net to get a copy of this message | ||
Hi All,
Relatively new PHP coder (was in an MS / ASP shop before)... I'm doing some
flat-file manipulation (please, spare me the database comments, I'm working
on it!), and I'm having to read strings out of one file and copy them into
another until a while() condition is satisfied.
The problem is, I seem to always end up with a blank line at the end of my
files (which then screws up later file-processing) - I'm assuming because of
the \n that fwrite() appends to the end of each string...
Is there a simple way to get rid of this blank line or somehow get fwrite()
to NOT put a newline on the end of a string?
Thanks in Advance,
--Noel Wade