PHP 函数 ctype_alnum() PHP 函数 method_exists() PHP 函数 ctype_alpha() PHP 函数 ctype_alnum() <?php $strings = array('hello', 'foo!#$bar'); foreach ($strings as $example) { if (ctype_alnum($example)) { echo "$example consists of all letters or digits. \n"; }else { echo "$example does not have all letters or digits. \n"; } } ?> PHP 函数 method_exists() PHP 函数 ctype_alpha()