判断一个数组里面的所有键所对应的值是否是为int型
2021-01-10 02:31
阅读:624
            
                         标签:das   gic   php_eol   一个   http   sda   lib   数组   sts    $tests = array( 判断一个数组里面的所有键所对应的值是否是为int型 标签:das   gic   php_eol   一个   http   sda   lib   数组   sts    原文地址:https://www.cnblogs.com/xieqijiang/p/12956953.html
    "sdas"=>13
);
foreach ($tests as $element) {
    if (is_numeric($element)) {
        echo "‘{$element}‘ is numeric", PHP_EOL;
    } else {
        echo "‘{$element}‘ is NOT numeric", PHP_EOL;
    }
}
?>
//http://www.nowamagic.net/librarys/veda/detail/2023
下一篇:Java 集合框架
评论
亲,登录后才可以留言!