Re: [PHP] Trying to remove bad charactors.

2002-01-28 Thread bvr
Special characters must be escaped with a backslash: $q = preg_replace("\!", "", $q); or $q = preg_replace( preg_quote("!@#$%^&*()"), "", $q); bvr. On Mon, 28 Jan 2002 11:24:30 +1300, Philip J. Newman wrote: >I'm trying to replace !@#$%^&*() with nothing how ever every thing that I try it

Re: [PHP] Trying to remove bad charactors.

2002-01-27 Thread Jason Wong
On Monday 28 January 2002 06:24, Philip J. Newman wrote: > I'm trying to replace !@#$%^&*() with nothing how ever every thing that I > try it takes out the space too which is bad. Siggestions > > $q=preg replace("!","",$q); Use str_replace(). Only use preg() and friends *IF* you need to search f

[PHP] Trying to remove bad charactors.

2002-01-27 Thread Philip J. Newman
I'm trying to replace !@#$%^&*() with nothing how ever every thing that I try it takes out the space too which is bad. Siggestions $q=preg replace("!","",$q); Philip J. Newman Philip's Domain - Internet Project. http://www.philipsdomain.com/ [EMAIL PROTECTED] Phone: +64 25 6144012