PHP-foreach與while

//舊的寫法
while(list($key,$value) = each($attributes)){
//do something
}
//PHP4版本新增
foreach($attributes as $key => $value){
//do something
}

發表迴響

Copy Protected by Chetan's WP-Copyprotect.