You are here: Re: Can I get the value from an assoc array that is returned by a function...in one statement? « PHP Programming Language « IT news, forums, messages
Re: Can I get the value from an assoc array that is returned by a function...in one statement?

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
>

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация