Re: Perl-Like Pre-Destined Array Designation
| From: | Maxim Maletsky | Date: | Wed, 23 Oct 2002 13:10:15 +0000 |
| Subject: | Re: Perl-Like Pre-Destined Array Designation | ||
| References: | 1 | Groups: | php.dev |
| Request: | Send a blank email to php-dev+get-89991@lists.php.net to get a copy of this message | ||
Would be very nice to have since PHP v5. Guys?
---
Maxim Maletsky
maxim@php.net
www.PHPBeginner.com // PHP for Beginners
www.maxim.cx // my Home
// my Wish List: ( Get me something! )
http://www.amazon.com/exec/obidos/registry/2IXE7SMI5EDI3
Adam Voigt <adam@cryptocomm.com> wrote... :
> Ok, the other day a friend of mine showed me where you
> could address a position in an array in perl, before you
> even had the array returned. Essentially it would be
> this in php:
>
> echo explode(",",$somearray)[0];
>
> Which would give you the first position of what was returned
> from the explode function without having to set it to a variable.
> I know PHP doesn't support this, but my question is, are you
> going to add it? I just ask because I have seen several cases
> were I would have liked that ability but wasn't able to.
>
> Adam Voigt
> adam.voigt@cryptocomm.com
>
> P.S. Thanks for PHP by the way, I hesitate to think about programming
> without it.
>
>
> --
> PHP Development Mailing List <http://www.php.net/>
> To unsubscribe, visit: http://www.php.net/unsub.php
>