What does the percent sign mean in PHP?

后端 未结 6 1134
生来不讨喜
生来不讨喜 2020-12-03 04:25

What exactly does this mean?

$number = ( 3 - 2 + 7 ) % 7;
6条回答
  •  南方客
    南方客 (楼主)
    2020-12-03 04:57

    It is the modulus operator. In the statement $a % $b the result is the remainder when $a is divided by $b

提交回复
热议问题