bsp; */ /* 根据相关数学定义 */ return("是的"); } } } print("<B>0是整数吗?</B>" . checkInteger(0) . "<BR>\n"); print("<B>7是整数吗?</B> " . checkInteger(7) . "<BR>\n"); print("<B>3.5呢?</B>" . checkInteger(3.5) . "<BR>\n"); print("<B>那么-5呢?</B>" . checkInteger(-5) . "<BR>\n"); print("<B>还有-9.2?</B>" . checkInteger(-9.2) . "<BR>\n"); ?> </BODY> </HTML> 初始化数组
<HTML> <HEAD> <TITLE>初始化数组</TITLE> </HEAD> <FONT SIZE=5> <? $monthName = array(1=>"January", "February", "March",//初始化一个数组 "April", "May", "June", "July", "August", "September", "October", "November", "December"); print(" 英语的“5月”是<B> $monthName[5] </B>。<BR>\n");//打印数组中的第6个元素 ?> </FONT> </BODY> </HTML> 获取数组中的元素 <HTML> <HEAD> <TITLE>获取数组中的元素</TITLE> </HEAD> <? $monthName = array( /*定义$monthName[1]到$monthName[12]*/ 1=>"January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December", /*定义$monthName["Jan"]到$monthName["Dec"]*/ "Jan"=>"January", "Feb"=>"February", "Mar"=>"March", "Apr"=>"April", "May"=>"May", "Jun"=>"June", "Jul"=>"July", "Aug"=>"August", "Sep"=>"September", "Oct"=>"October", "Nov"=>"November", "Dec"=>"December", /*定义$monthName["Jan"]到$monthName["Dec"]*/ "January"=>"January", "February"=>"February", "March"=>"March", "April"=>"April", "May"=>"May", "June"=>"June", "July"=>"July", "August"=>"August", "Septe |