Well, I just used that array as an example... The real one looks like this:
$current_month = strftime ("%m");
$current_day = strftime ("%d");
$months_days = (array (1 => 31, 2 => 29, 3 => 31, 4 => 30, 5 => 31, 6 => 30, 7 => 31, 8 => 31, 9 => 30, 10 => 30, 11 => 30, 12 => 31));
$till_days = $months_days[$current_month] - $current_day;
I guess I should have just posted this one in the first place. $months_days contains the number of days per month (Jan = 1, so 31 days)... Is there something built into PHP that'll figure out how many days per month in a more oranized fashon?
"And cast $num to an int before using as an array index" I'm assuming int = integer? I'm extremely new to programming, I guess I need to get a good, easy to read PHP book. 🙂