A fairly common way is using ereg_ functions, such as :
$string = eregi_replace('[0-9a-z]','',$string);
Which will make more sense after reading :
http://phpbuilder.com/columns/dario19990616.php3
Essentially it means "replace anything that isn't 0-9 or a-z with '' (nothing) and be case insensitive while doing it."