Associate
- Joined
- 18 Jul 2009
- Posts
- 678
- Location
- UK
Hello, I am writing a calendar using PHP, but I am having difficulty manipulating or even using arrays.
Why doesn't this work?
The array is defined as
I have exactly the same script written in javascript and it works, but I am just not sure on how to use arrays in PHP.
Thanks in advance.
Why doesn't this work?
Code:
$remainingDays = ($monthStart + $daysInMonth[$month - 1]) % 7;
The array is defined as
Code:
$daysInMonth = array(31, 28, 31, 30, 31, 30, 31, 30, 31, 30, 31, 30);
I have exactly the same script written in javascript and it works, but I am just not sure on how to use arrays in PHP.
Thanks in advance.