Showing posts with label alphanumeric. Show all posts
Showing posts with label alphanumeric. Show all posts

Remove All Characters except Letters and Numbers (alphanumeric)

Unwanted characters in HTML output can be a pain. Here's a quick way to get rid of them:

ereg_replace("[^A-Za-z0-9]", "", $string);

Send in any improvements via comments :)