Display text once within while loop on the first loop

后端 未结 4 522
半阙折子戏
半阙折子戏 2021-02-03 15:44
Show this once

\"; print \"

display everytime

\"; $i++; } ?>
4条回答
  •  野趣味
    野趣味 (楼主)
    2021-02-03 16:18

    Yes, indeed.

    You can also combine the if and the increment, so you won't forget to increment:

    if (!$i++) echo "Show once.";
    

提交回复
热议问题