Home  >  Q&A  >  body text

for循环中,$i++ 这个有什么作用么?

素颜素颜2835 days ago1594

reply all(3)I'll reply

  • 数据分析师

    数据分析师2017-09-30 22:40:35

    In the for loop, does $i++ have any effect? -PHP Chinese website Q&A-In the for loop, does $i++ have any effect? -PHP Chinese website Q&A

    Please watch and learn.

    reply
    0
  • 本Q已中毒

    本Q已中毒2017-09-25 15:57:08

    It means that the variable $i adds 1 and keeps adding, unless you set a precondition, such as $i=0;$i<100;$i++

    reply
    0
  • 阿神

    阿神2016-12-17 09:48:05

    这是加一的意思,相当于$i=$i+1

    $i=1;

    $i++;

    执行了这两条语句之后,$i的值就变成2了

    reply
    0
  • Cancelreply