On Sunday 30 June 2002 01:24, Beverly Steiner wrote:

> Thanx for your suggestion but I tried it and it didn't work.  I'm not sure
> if it matters, but this running on NT.

Not sure whether NT has anything to do with it but it works for me :-) 

If you can't get the following code to work then you might want to check 
whether it is a known bug (http://bugs.php.net).

<?
$test_string = '1.2$General/ms1.zip';
$new_string = preg_replace("/\\$/", "%", $test_string);
echo "new_string is $new_string";
?>

But as someone has pointed out, you should be using single-quotes to prevent 
unwanted/unexpected variable expansion:

$new_string = preg_replace('/\$/', '%', $test_string);

-- 
Jason Wong -> Gremlins Associates -> www.gremlins.com.hk
Open Source Software Systems Integrators
* Web Design & Hosting * Internet & Intranet Applications Development *

/*
All great discoveries are made by mistake.
                -- Young
*/


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to