|  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
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
Block user comment
Status: Assign to:
Bug Type:
From: james at calminferno dot net
New email:
PHP Version: OS:


 [2009-12-09 18:30 UTC] james at calminferno dot net
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.


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2009-12-09 19:25 UTC]
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-2022 The PHP Group
All rights reserved.
Last updated: Fri Jan 28 06:03:41 2022 UTC