请输入您要查询的百科知识:

 

词条 ctype_alpha
释义

ctype_alpha

(PHP 4 >= 4.0.4, PHP 5)

ctype_alpha -- 检查字母

函数原型

bool ctype_alpha ( string text )

检查字母

范例

<?php

$strings = array('KjgWZC', 'arf12');

foreach ($strings as $testcase) {

if (ctype_alpha($testcase)) {

echo "The string $testcase consists of all letters.\";

} else {

echo "The string $testcase does not consist of all letters.\";

}

}

?>

上例将输出:

The string KjgWZC consists of all letters. The string arf12 does not consists of all letters.

随便看

 

百科全书收录4421916条中文百科知识,基本涵盖了大多数领域的百科知识,是一部内容开放、自由的电子版百科全书。

 

Copyright © 2004-2023 Cnenc.net All Rights Reserved
更新时间:2025/2/5 3:03:32