Reply to Re: Can I get the value from an assoc array that is returned by a function...in one statement?

Your name:

Reply:


Posted by NC on 01/12/06 02:53

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]


Удаленная работа для программистов  •  Как заработать на 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

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