Re: Still problem with files

From: Date: Fri, 18 Jul 2003 05:47:46 +0000
Subject: Re: Still problem with files
References: 1 2  Groups: php.general 
Request: Send a blank email to php-general+get-155727@lists.php.net to get a copy of this message
Jason Wong <php-general@gremlins.biz> wrote: > On Thursday 17 July 2003 12:18, Beauford.2005 wrote: > > > > So using the example above what would I use where the question marks are > > if I wanted to display everything but this line - <Option > > Value="3">Alfredsson. I have tried a variety of ways to do this: > > If you're going to be using file() then: > > if($list[$i] != "<Option> Value=\"3\">Alfredsson\n"; > > Note the \n, substitute for whatever CR/LF characters are present in your > file because file() leaves them intact. I would recomend using if(trim($list[$i]) != "<Option> Value=\"3\">Alfredsson") it will handle the any problems with DOS or UNIX text files. Curt. --

« previous php.general (#155727) next »