Re: Problem with file()

From: Date: Wed, 17 Apr 2002 11:29:47 +0000
Subject: Re: Problem with file()
References: 1 2  Groups: php.general 
Request: Send a blank email to php-general+get-93314@lists.php.net to get a copy of this message
Dear Justin, thanks for your reply. I'm not adding any new lines. I'm just searching for a string between two comments in order to replace it by another string in a template fashion. The remaining HTML code should remain untouched, but the newlines among the HTML code lines outside these commented out block grow and grow every time I parse. implode ("", file("any_file")) has funny results in a Windows environment anyway. Try it with a short text file (created with WordPad), and the line returns seem to disappear. Use "\r" as glue, and they seem to be back. Do a ereg for "\r\n" without using the "\r" as glue, and the care returns are there, although Windows text editors seem to not detect them (the lines appear without returns between them). Michael

« previous php.general (#93314) next »