Re: reading last -n lines array is emty

From: Date: Thu, 06 Mar 2003 21:31:54 +0000
Subject: Re: reading last -n lines array is emty
References: 1 2 3 4 5 6 7 8 9 10  Groups: php.general 
Request: Send a blank email to php-general+get-138533@lists.php.net to get a copy of this message
----- Original Message ----- From: "1LT John W. Holmes" <holmes072000@charter.net> To: "Kevin Stone" <kevin@helpelf.com>; "WebDev" <WebDev@browseabit.com>; <php-general@lists.php.net> Sent: Thursday, March 06, 2003 2:06 PM Subject: Re: [PHP] reading last -n lines array is emty > > Holy crap looks like I was wrong! I just tested it and sure enough '|' > does > > return an error.. how do you like that. So use split("\|", $file[$i]). > > For a regular expression "|" means OR. You could use explode("|",$file[$i]) > for the sam effect. Benchmark split() vs. explode() and see which is > faster... > > ---John Holmes... Indeed. My mistake was in assuming that split() parses the parameter as string rather than an expression. - Kevin

« previous php.general (#138533) next »