php ctype函数中文翻译和示例(2)


<?php 
$strings = array('1820.20', '10002', 'wsl!12'); 
foreach ($strings as $testcase) { 
    if (ctype_digit($testcase)) { 
        echo "The string $testcase consists of all digits.\n"; 
    } else { 
        echo "The string $testcase does not consist of all digits.\n"; 
    } 

?>  

您可能感兴趣的文章:

内容版权声明:除非注明,否则皆为本站原创文章。

转载注明出处:http://www.heiqu.com/cb85b00749e83641370ab9acef2641d2.html