By rodmartin on
This is such a newb question - (I can't wait to get my head around drupal so I can give instead of take in the forums...)
I'm trying to create a list of years from 2008 to 1978 in the allowed values for a drop down field called year.
I have CCK, Views.
heres the code I entered in the PHP Allowed Values List for the created field:
$year=date('Y')+1;
$count=0;
$y=array($year);
while ($count < 30)
{
$year--;
$count++;
array_push($y,$year);
}
while (list($key,$value)=each($y))
{
echo "$value
";
}
any help would be appreciated... I know this must be simple...
Thanks!
Comments
fixed
entering return $y; would have helped...
duh
Rod