4,5,6,7);foreach($arr as $value){echo "{$value}";}" />
php可以用来访问数组的元素的是?
php使用foreach关键字循环遍历数组。代码如下:
$arr = array(1,2,3,"one"=>4,5,6,7);
foreach($arr as $value){
echo "{$value}";
}
foreach($arr as $key => $value){
echo "{$key}==>{$value}";