ID:               46193
 Updated by:       [EMAIL PROTECTED]
 Reported By:      muqtada at hotmail dot com
 Status:           Bogus
 Bug Type:         Strings related
 Operating System: windows
 PHP Version:      5.2.6
 New Comment:

It's still bogus. do an 
echo "wwwroot\test\wp2";

and you'll see why (\t is a <tab>, you need to escape it properly if
you don't want to have a tab there. If you do, your replace will work as
you expect it.). str_replace works correctly and as intended. The bug is
in your understanding, not the engine.


Previous Comments:
------------------------------------------------------------------------

[2008-09-28 21:41:28] muqtada at hotmail dot com

oops, i am sorry, yes i know it takes three arguments, i used following
script

print str_replace('\\',"/","wwwroot\test\wp2");

------------------------------------------------------------------------

[2008-09-28 21:32:36] [EMAIL PROTECTED]

I'm not sure what you did but the script you show can't work.

str_replace takes three arguments and you have to use "\\" and not
"\".


------------------------------------------------------------------------

[2008-09-28 21:25:44] muqtada at hotmail dot com

Description:
------------
i tried following script
print str_replace("wwwroot/test/wp","\");
its results in wwwroot est/wp

same time fuction is working fine on other orguments like

print str_replace("wwwroot/mycode/wp","\");
its results in wwwroot\mycode\wp



Expected result:
----------------
wwwroot/test/wp



------------------------------------------------------------------------


-- 
Edit this bug report at http://bugs.php.net/?id=46193&edit=1

Reply via email to