search

Home  >  Q&A  >  body text

for语句的$i 和$sum变量必须在括号里面赋值呢?

小白小白2969 days ago1046

reply all(2)I'll reply

  • 数据分析师

    数据分析师2017-09-30 23:36:53

    The $i and $sum variables in the for statement must be assigned values ​​inside parentheses? -PHP Chinese website Q&A-Do the $i and $sum variables in the for statement have to be assigned within parentheses? -PHP Chinese website Q&A

    Please watch and learn.

    reply
    0
  • 迷茫

    迷茫2016-12-22 14:53:47

    也可以在外面先赋值,放在循环内,代码会比较简洁一点!现在大部分都习惯了这样的写法!

    reply
    1
  • 看透不说透

    原来是这样,知道了,感谢!

    看透不说透 · 2016-12-22 15:18:05
  • Cancelreply