php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Request #50430 array_key_position
Submitted: 2009-12-09 18:30 UTC Modified: 2009-12-09 19:25 UTC
From: james at calminferno dot net Assigned:
Status: Not a bug Package: Feature/Change Request
PHP Version: 5.3.1 OS: All
Private report: No CVE-ID: None
View Add Comment Developer Edit
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
MUST BE VALID
Solve the problem:
25 + 23 = ?
Subscribe to this entry?

 
 [2009-12-09 18:30 UTC] james at calminferno dot net
Description:
------------
Create a single function called array_key_position that returns the array position of a key. Basically turning array_search( $key, array_keys( $my_assoc_array ) ) into a single function that returns the key position or false if doesn't exist.


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2009-12-09 19:25 UTC] fa@php.net
As you already explained, it's chaining 2 already built-in functions, both array-related. Doesn't look like another function is needed here.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Apr 25 10:01:29 2024 UTC