Does checkdate() not work with array elements? When I tried to run the following code, I would get an error. (Unexpected '[' or something like that.)
if (checkdate($invoice_month[$i], $invoice_day[$i], $invoice_year[$i])) {
...do something....
}
I tried putting single and double quotes around the variables, which got rid of the error, but then checkdate would always resolve to 'false.'
I've handled the problem by creating temporary, non-array variables for the checkdate test, so my code works now, but it seems awkward and wrong.
Am I doing something stupid? Is there a reason checkdate() doesn't work with array elements? This seems wrong.
Thanks.
Mark