foreach循環(huán)遍歷數(shù)組 請問如何用for循環(huán)輸出數(shù)組里面的值?
請問如何用for循環(huán)輸出數(shù)組里面的值?循環(huán)輸出PHP數(shù)組有兩種方法:第一種方法是$arr=array(125811931785)foreach($Arras$value){echo$value//ou
請問如何用for循環(huán)輸出數(shù)組里面的值?
循環(huán)輸出PHP數(shù)組有兩種方法:第一種方法是$arr=array(125811931785)foreach($Arras$value){echo$value//output array content here}第二種方法是$arr=array(125811931785)for($I=0$I<count($arr)$I){echo$arr[$I]//output number group content here}第一種方法使用foreach遍歷數(shù)組,這是最常用的方法!