以下php程序的运行结果是什么。(max($arr)函数的作用是返回数组$arr里最大的数值)$val){if($maxval == $val){$maxkey = $key;}}return $maxkey;}$arr = array(0,-1,-2,5,15,3);echo maxkey($arr)?>
查看答案
以下php程序的运行结果空白处应填什么。1,2,3,8,9,6,"b"=>5,-1,"c"=>8,0,7);echo"";print_r($arr);?>运行结果:Array([a] =>[0] => 2[ ] => 3[2] => 8[3] => 9[4] => 6[ ] => 5[5] => -1[c] =>[6] => 0[7] => 7)
产生4个随机数,以下php代码空白处应该填什么。//随机产生4个随机数$checkCode="";for($i=1;$i<;$i++){$checkCode.=(rand(1,15));//十进制转换为十六进制,即验证码上要显示的数字}
为验证码制造干扰,在画布$image1中创建20条弧线,要求弧线颜色均为红色,以下PHP语句空白处应填什么。for($j=0;$j<20;$j++){($image1,rand(0,100),rand(0,30),rand(0,100),rand(0,30),rand(0,360),rand(0,360),imagecolorallocate($image1,,,));}
将已生成的验证码字符串$checkCode设置为蓝色,显示在$image1画布上,以下php语句空白中应该填什么。$blue=imagecolorallocate($image1,,,);($image1,rand(2,5),rand(5,70),rand(2,15),$checkCode,$blue);