Fwd: Re: [PHP] Regex error

From: Date: Fri, 18 Jan 2002 22:45:26 +0000
Subject: Fwd: Re: [PHP] Regex error
Groups: php.general 
Request: Send a blank email to php-general+get-81168@lists.php.net to get a copy of this message
split() takes a regular expression, this means you have to escape the | char with a \ like this: $rgTemp = split("\|",$szTag); bvr. On Fri, 18 Jan 2002 14:40:25 -0800, PHP List wrote: >Hi, >Can someone please tell me why the this is happening: > >1) $szTag = "test|3"; >2) $rgTemp = split("|",$szTag); >3) $szTag = $rgTemp[0]; >4) $nItemID = $rgTemp[1]; >^line numbers for ref only, not in actual code. > > >Will give me the error: >PHP Warning: unexpected regex error(14) in /test.php on line 2 > >What is an error 14 ?

« previous php.general (#81168) next »