<font face="courier new, courier, mono" color="#0000ff" size="3"> <hr> <br><br><title>常用的数值判断函数</title> <br><br><br><br> //判断数组<br> $colors = array("red", "blue", "green");<br> if(is_array($colors))<br> {<br> print("colors is an array"."<br>");<br> }<br> //双精度数判断<br> $Temperature = 15.23;<br> if(is_double($Temperature))<br> {<br> print("Temperature is a double"."<br>");<br> }<br> //整数判断<br> $PageCount = 2234;<br> if(is_integer($PageCount))<br> {<br> print("$PageCount is an integer"."<br>");<br> }<br> //对象判断<br> class widget<br> {<br> var $name;<br> var $length;<br> }<br> $thing = new widget;<br> if(is_object($thing))<br> {<br> print("thing is an object"."<br>");<br> }<br> //字符判断<br> $Greeting = "Hello";<br> if(is_string($Greeting))<br> {<br> print("Greeting is a string"."<br>");<br> }<br>?><br><br> <hr> <img alt="常用的数值判断函数" hspace="0" src="http://img.bitscn.com/upimg/php/20070123/11E5514202301HJ.jpg" align="baseline" border="0"></font>