Link to home
Start Free TrialLog in
Avatar of rgb192
rgb192Flag for United States of America

asked on

correct syntax of mod operation

PHP
4 different week(date) types
this week is the 21st week of the year: this could be week_type 1
next week: week_type: 2
following week: week_type: 3
final week: week_type:4
week after: week_type:1


what is correct syntax of mod operation in this instance
SOLUTION
Avatar of Ray Paseur
Ray Paseur
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Avatar of hielo
hielo
Flag of Wallis and Futuna image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of rgb192

ASKER

This is actually the 22nd week of the year. Where do you want to go from here?
want week type of month not year


by: hieloPosted on 2013-05-28 at 20:33:36ID: 39203234
$week_type = $week_type % 4;

how do I instantiate variable $week_type
ASKER CERTIFIED SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of rgb192

ASKER

the code without mod was easier to follow
thanks both