i.e. something that will remove all characters from a string other than a-z, 0-9 and .
g1smd
6:24 pm on Jun 2, 2012 (gmt 0)
Try:
preg_replace('/[^A-Za-Z0-9.]/','', $string)
The
'/ /'
part is VERY important.
whatson
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
4:05 am on Jun 3, 2012 (gmt 0)
Showing us your code would be helpful, especially line 4