Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

Remove special characters

function removeSpecialChar($string) 
		{
			$string = strtolower($string);
			$string = preg_replace('/[^da-z ]/i', '', $string);// Removes special chars.
			$string = str_replace(' ', '-', $string); // Replaces all spaces with underscore.
			return strtolower($string);
		}
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #Remove #special #characters
ADD COMMENT
Topic
Name
3+6 =