Posted by lwoods on 01/12/06 04:38
Thanks
Larry
"NC" <nc@iname.com> wrote in message
news:1137027237.625458.192190@g47g2000cwa.googlegroups.com...
> lwoods wrote:
>>
>> I want to be able to get the present year in one statement. I know that
>> I
>> can do it this way:
>>
>> $y = getdate();
>> echo 'year='.$y['year'];
>>
>> But, I want to do something like:
>>
>> echo 'year='.getdate()['year']; # BAD, I know
>
> There's no need to use getdate() if all you want is year. Consider
> this:
>
> echo date('Y');
>
> Cheers,
> NC
>
[Back to original message]
|