PHP for循环

for ($i=1; $i<=5; $i++)
{
    echo "数字为 " . $i . PHP_EOL;
}

foreach 循环

foreach ($array as $value)
{
    要执行代码;
}

foreach ($array as $key => $value)
{
    要执行代码;
}