What does the percent sign mean in PHP?

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

What exactly does this mean?

$number = ( 3 - 2 + 7 ) % 7;
6条回答
  •  猫巷女王i
    2020-12-03 04:59

    Using this operator one can easily calculate odd or even days in month for example, if needed for schedule or something:

    
    

提交回复
热议问题