Get the alphanumeric characters in a string

by kalai 2010-02-11 11:59:18

We can get the alphanumeric characters in the string and remove the special characters using regular expression

$str = preg_replace("/[^a-zA-Z0-9\s]/", "", $str);

Tagged in:

1134
like
0
dislike
0
mail
flag

You must LOGIN to add comments