I tried to create an array[year][month][day] that contains a 1 whenever the day exists, e.g. array[2002][11][19] should be 1 while array[2002][2][30] should be 0.
I always get a parse error ("Cannot use a scalar value as an array") in the line where I want to set the 1.
My code
for($i=2002; $i<=2003; $i++) // years
{
$valid[$i]=1;
for($j=1; $j<=12; $j++) // months
{
$valid[$i][$j]=1; // ERROR
for($k=1; $k<=31; $k++) // days
{
if(checkdate($j, $k, $i)==1)
{
$valid[$i][$j][$k]=1; //ERROR
}
}
}
}
I would be really thankful for any hints. Thanx, Phlow.