PHP头条
热点:

PHP数字判断函数


PHP的几个常用数字判断函数代码,主要包括双精度,整数,字符判断等。

<HTML> 
<HEAD> 
<TITLE>常用的数值判断函数</TITLE> 
</HEAD> 
<BODY> 
<? 
//判断数组 
$colors = array("red", "blue", "green"); 
if(is_array($colors)) 
{ 
print("colors is an array"."<br>"); 
} 
//双精度数判断 
$Temperature = 15.23; 
if(is_double($Temperature)) 
{ 
print("Temperature is a double"."<br>"); 
} 
//整数判断 
$PageCount = 2234; 
if(is_integer($PageCount)) 
{ 
print("$PageCount is an integer"."<br>"); 
} 
//对象判断 
class widget 
{ 
var $name; 
var $length; 
} 
$thing = new widget; 
if(is_object($thing)) 
{ 
print("thing is an object"."<br>"); 
} 
//字符判断 
$Greeting = "Hello"; 
if(is_string($Greeting)) 
{ 
print("Greeting is a string"."<br>"); 
} 
?> 
</BODY> 
</HTML>

您可能感兴趣的文章

  • PHP将阿拉伯数字转化为汉字的函数
  • PHP 生成连续的数字(字母)数组函数range()分析,PHP抽奖程序函数
  • PHP常用的判断变量的函数
  • php最精确的字符串长度截取函数
  • php获取汉字拼音首字母的函数(真正可以使用的)
  • php判断函数,类,类方法是否存在
  • php判断来访蜘蛛信息的函数
  • php读取目录并列表显示目录中的文件的函数

www.phpzy.comtrue/php/183.htmlTechArticlePHP数字判断函数 PHP的几个常用数字判断函数代码,主要包括双精度,整数,字符判断等。 HTML HEAD TITLE常用的数值判断函数/TITLE /HEAD BODY ? //判断数组 $colors = array("red", "blue", "green"); if(...

相关文章

相关频道:

PHP之友评论

今天推荐