RE: [PHP] split ...

From: Date: Tue, 04 Nov 2003 16:19:29 +0000
Subject: RE: [PHP] split ...
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-168479@lists.php.net to get a copy of this message
Hi, Thanks, that worked like a charm. I didn't realize that | was a special character, that's good to know. I also agree with the explode method. Seems quicker. Thanks! -Dan Joseph > The | character is a special character in regular expressions, > which split() > expects. So, you can use > > split("\|",$line) > > which escapes the | character. > > Although, since you're not really using a regular expression, you'd be > better off (more efficient) to just use > > explode('|',$line)

« previous php.general (#168479) next »