note 28824 deleted from function.strcspn by aidan
| From: | aidan@php.net | Date: | Fri, 27 Aug 2004 09:23:05 +0000 |
| Subject: | note 28824 deleted from function.strcspn by aidan | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-75409@lists.php.net to get a copy of this message | ||
Note Submitter: info at owensoft dot net
----
this function checks if a string contains special characters excluding "_" and
"-". you can also easy customise it.
function vstr2 ($str) { //
if ( strcspn($str, '~`!@#$%^&*()+{}[]| \\:;<>,./?+=' ) != strlen($str) )
return false;
if ( !ctype_print ($str) ) return false;
return true;
}