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

From: Date: Mon, 02 Dec 2002 03:06:23 +0000
Subject: #20754 [Bgs->Csd]: PROBLEM WITH SPLIT FUNCTION
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-26346@lists.php.net to get a copy of this message
ID: 20754 User updated by: ahhsee@ntu.edu.sg Reported By: ahhsee@ntu.edu.sg -Status: Bogus +Status: Closed Bug Type: Strings related Operating System: Win 2k PHP Version: 4.2.3 New Comment: sorry, didnt know i have to put 2 escape characters for a for both escape character \ and search character '\'. thanks :) Previous Comments: ------------------------------------------------------------------------ [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 (#26346) next »