#20754 [Csd->Bgs]: PROBLEM WITH SPLIT FUNCTION

From: Date: Mon, 02 Dec 2002 03:16:15 +0000
Subject: #20754 [Csd->Bgs]: PROBLEM WITH SPLIT FUNCTION
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-26348@lists.php.net to get a copy of this message
ID: 20754 Updated by: philip@php.net Reported By: ahhsee@ntu.edu.sg -Status: Closed +Status: Bogus Bug Type: Strings related Operating System: Win 2k PHP Version: 4.2.3 Previous Comments: ------------------------------------------------------------------------ [2002-12-01 21:06:22] ahhsee@ntu.edu.sg sorry, didnt know i have to put 2 escape characters for a for both escape character \ and search character '\'. thanks :) ------------------------------------------------------------------------ [2002-12-01 20:56:37] sniper@php.net Your regex is broken, it should be: $arr = split ("\\\\", $mytest); ------------------------------------------------------------------------ [2002-12-01 20:36:35] ahhsee@ntu.edu.sg I was trying to split the string with the splitter "\", but it gives me this error message: "Warning: REG_EESCAPE:wtrailing backslash (\) in E:\Inetpub\wwwroot\test\split.php on line 8" MY SCRIPT: $mytest = "STAFF\Tester"; $arr = split ("\\", $mytest); //--> ERROR! Please help! ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=20754&edit=1

« previous php.bugs (#26348) next »