english/administrator/components/com_aicontactsafe/models/default.php
// function to remove from a string all characters that are not letters, numbers or the "_" character
function to remove from a string all characters that are not letters, numbers or the "_" character
function to remove from a string all characters that are not letters numbers or the " _ " character
function onlyLettersAndNumbers( $stringToCheck = '' ) {
		$responseString = '';
		if (is_string($stringToCheck)) {
			$n = strlen($stringToCheck);
			for( $i=0; $i<$n; $i++ ) {
				$chr = substr($stringToCheck,$i,1);
				$ascii_code = ord($chr);
				switch(true) {
					case $ascii_code >= 48 && $ascii_code <= 57 :
						$responseString .= $chr;
						break;
					case $ascii_code >= 65 && $ascii_code <= 90 :
						$responseString .= $chr;
						break;
					case $ascii_code == 95 :
						$responseString .= $chr;
						break;
					case $ascii_code >= 97 && $ascii_code <= 122 :
						$responseString .= $chr;
						break;
				}
			}
		}
		return $responseString;
	}
function onlyLettersAndNumbers ( $ stringToCheck = '' ) { $ responseString = '' ; if ( is_string ( $ stringToCheck ) ) { $ n = strlen ( $ stringToCheck ) ; for ( $ i = 0 ; $ i < $ n ; $ i ++ ) { $ chr = substr ( $ stringToCheck , $ i , 1 ) ; $ ascii_code = ord ( $ chr ) ; switch ( true ) { case $ ascii_code >= 48 && $ ascii_code <= 57 : $ responseString .= $ chr ; break ; case $ ascii_code >= 65 && $ ascii_code <= 90 : $ responseString .= $ chr ; break ; case $ ascii_code == 95 : $ responseString .= $ chr ; break ; case $ ascii_code >= 97 && $ ascii_code <= 122 : $ responseString .= $ chr ; break ; } } } return $ responseString ; }
function to remove from a string all characters that are not letters, numbers or the "_" character
function to remove from a string all characters that are not letters numbers or the " _ " character