Thread
:
preg_replace causing to repeat
View Single Post
#
2
(
permalink
)
07-16-2008, 06:28 AM
curtiss
Moderator
Join Date: May 2003
Posts: 1,468
That's because you're adding to the $new variable, rather than reinstantiating it each time. Get rid of the dot in front of the equal sign in this line:
PHP Code:
$new
.=
preg_replace
(
"/[^ -þ]/"
,
""
,
$old
);
__________________
I hate Internet Explorer! Anyone with me?
curtiss
View Public Profile
Visit curtiss's homepage!
Find all posts by curtiss