g1smd

msg:4460790 | 6:24 pm on Jun 2, 2012 (gmt 0) |
Try: preg_replace('/[^A-Za-Z0-9.]/','', $string) The '/ /' part is VERY important.
|
whatson

msg:4460845 | 12:50 am on Jun 3, 2012 (gmt 0) |
I got this response Warning: preg_replace() [function.preg-replace]: Compilation failed: range out of order in character class at offset 7 in C:\xampp\htdocs\test.php on line 4
|
incrediBILL

msg:4460861 | 4:05 am on Jun 3, 2012 (gmt 0) |
Showing us your code would be helpful, especially line 4
|
SteveWh

msg:4460873 | 6:31 am on Jun 3, 2012 (gmt 0) |
The second z needs to be lowercase, that's all: preg_replace('/[^A-Za-z0-9.]/','', $string)
|
whatson

msg:4460909 | 12:54 pm on Jun 3, 2012 (gmt 0) |
Thanks Steve that worked great.
|
g1smd

msg:4460953 | 4:15 pm on Jun 3, 2012 (gmt 0) |
Ah. Didn't spot the typo in the OP. :)
|
|