You are here: Re: can this be done, referrring to an array immediately « All PHP « IT news, forums, messages
Re: can this be done, referrring to an array immediately

Posted by Norman Peelman on 11/22/06 04:07

"windandwaves" <nfrancken@gmail.com> wrote in message
news:1164159141.932482.73140@m73g2000cwd.googlegroups.com...
> Hi Folk
>
> If I have myfunction() {
> return array();
> }
>
> then can I write
>
> echo myfunction()[0];
>
> I tried that, and I can not, but is there a way or do I have to write
> $myvar = myfunction();
> echo $myvar[0];
>
> TIA
>
> >nicolaas
>

What do you mean you 'have' to write... try:

$rtn_arr = myfunction();
echo $rtn_arr[0];





Norm
--
FREE Avatar hosting at www.easyavatar.com

 

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

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