 |
| 我的知识库 |
 |
|
|
PHP实例:常用的数值判断函数 |
|
[ 作者: | 文章来源: 网页教学网 | 点击数: 523 | 更新时间: 2007-10-13 17:37:43 ] |
以下为引用的内容:
常用的数值判断函数
//判断数组 $colors = array("red", "blue", "green"); if(is_array($colors)) { print("colors is an array"." "); } //双精度数判断 $Temperature = 15.23; if(is_double($Temperature)) { print("Temperature is a double"." "); } //整数判断 $PageCount = 2234; if(is_integer($PageCount)) { print("$PageCount is an integer"." "); 中.国.南通服务器网 } //对象判断 class widget { var $name; var $length; } $thing = new widget; if(is_object($thing)) { print("thing is an object"." "); } //字符判断 $Greeting = "Hello"; if(is_string($Greeting)) { print("Greeting is a string"." "); } ?>
Spdns~com
|
Www^Spdns^com
|
|
|
|
|