Re: Return an Array and immediately reference an index

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sat, Apr 12, 2008 at 12:18 PM, Casey <heavyccasey@xxxxxxxxx> wrote:

> On Sat, Apr 12, 2008 at 9:12 AM, Nathan Nobbe <quickshiftin@xxxxxxxxx>
> wrote:
> > On Fri, Apr 11, 2008 at 6:33 PM, Daniel Kolbo <kolb0057@xxxxxxx> wrote:
> >
> >  search the archives ;)
> >
> >  http://www.mail-archive.com/php-general@xxxxxxxxxxxxx/msg224626.html
> >
> >  -nathan
> <?php
> function ReturnArray() {
>    return array('a' => 'f', 'b' => 'g', 'c' => 'h', 'd' => 'i', 'e' =>
> 'j');
> }
>
> echo ${!${!1}=ReturnArray()}['a']; // 'f'
> ?>


ya; i never did sit down and try to figure out how that works; care to
explain ?

-nathan

[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux