為用戶定義函數(shù)is_leap()選擇一個合適的函數(shù)聲明。is_leap使用2000作為默認年份。()
A.function is_leap($year=2000) B.is_leap($year default 2000) C.function is_leap($year default 2000) D.function is_leap($year) E.function is_leap(2000=$year)
考慮如下代碼片段:標(biāo)記處填入什么代碼才能產(chǎn)生如下數(shù)組輸出()。
A.foreach($result as $key=>$val) B.while($idx*=2) C.for($idx=1;$idx<STOP_AT;$idx*=2) D.for($idx*=2;STOP_AT>=$idx;$idx=0) E.while($idx<STOP_AT)do $idx*=2
要修改每個元素的值,如何遍歷$myarray數(shù)組最合適?()
A.用for循環(huán) B.用foreach循環(huán) C.用while循環(huán) D.用do…while循環(huán) E.辦不到!