Array ( [2005-08-21] => 20 [2005-08-22] => 20 [2005-08-23] => 20 [2005-08-24] => 20 [2005-08-25] => 20)
The above is my array, the day of each date is sun(21), mon(22), tue(23), weds(24), thurs(25).
i use the code below which reports back the day of the week of each day
$day = date('w', $dates);
output
1
2
3
4
what i want to do is somehow to make the third element in the array = 0 if the first two elements that falls on a day between 0 and 4 (sun and thurs)
i.e
if the days are 0,1,2,3 then 2 should = 0
or
if the days are 3,4,5,6,0 then 0 should = 0
any ideas?