I have this calendar code i came up with after looking if i want to put in two or more weeks how can i do that? Think this works but not somone can help? Swiched but somthing seems to be missing.
What is your intention with these two lines of code?
if ($week_number = 23){
if ($week_number = 24){
If you’re intending to check the value of the week number, where is that value being set? And this is not the way to check a value, it’s a way to assign it. And if you did intend to be doing a comparison rather than an assignment, then your two lines won’t work because if it gets through the first one, it won’t get through the second one.
As for the original question
for($day=1; $day<=7; $day++){
Is it just as simple as extending this loop to cover more than seven days? Would that achieve what you need?
Sorry, can you expand on that, I’m not quite sure what you mean?
Have a very careful look at those two lines of code, and then see what I mean about the difference between assignment operators and comparison operators. If you intend those to be comparing values, they have a serious typo. And I don’t see in your code where you ever set a value for $week_number, if they are intended to be comparisons. If they are intended to be assignments, I’m struggling to see why you have them both.