PHP入门(1) for循环



    $x = $_GET['name'];
    echo $x;
    for($i =$x;$i<100;$i++)
    {
        echo $i,"
"
; } $TmpArray = ["A","B","C","D"]; foreach($TmpArray as $i) { echo $i . "
"
; } ?>

foreach循环迭代数组,跟常见的用法不一样,C++中
foreach (零时变量 in array)
php:
foreach (array as 零时变量)

你可能感兴趣的:(php)