Re: Re: array_last_key() function
| From: | Brandon Wamboldt | Date: | Sat, 14 Jul 2012 00:39:39 +0000 |
| Subject: | Re: Re: array_last_key() function | ||
| References: | 1 2 3 4 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-61219@lists.php.net to get a copy of this message | ||
Yeah, it would allow you to do this in one function call instead of three.
If you are going to have an array_last_key() function, it makes sense to
also have an array_first_key() function. After all, you could just do this:
foreach ( $array as $key => $v ) {}
echo $key;
On Fri, Jul 13, 2012 at 9:37 PM, Stas Malyshev <smalyshev@sugarcrm.com>wrote:
> Hi!
>
> > I like this idea. array_first_key would be nice too
>
> I am probably missing something, but what those would allow to do that
> rewind/end+key() doesn't do?
>
> --
> Stanislav Malyshev, Software Architect
> SugarCRM: http://www.sugarcrm.com/
> (408)454-6900 ext. 227
>
>
>
--
*Brandon Wamboldt*
Programmer / Web Developer
StackOverflow Careers
Profile<http://careers.stackoverflow.com/brandonwamboldt>-
GitHub
Profile <https://github.com/brandonwamboldt>
-
LinkedIn<https://github.com/brandonwamboldt>
-
My Blog <http://brandonwamboldt.ca/>