每进行一次循环迭代,$res数组元素的值就会被赋值给 $row变量,并且数组指针会逐一地移动,直到到达最后一个数组元素。
实例:
$colors = array("red","green","blue","yellow");
foreach ($colors as $value) {
echo "$value ";
}
?>