php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Request #822 request on array_walk
Submitted: 1998-10-06 06:57 UTC Modified: 2001-02-10 12:32 UTC
From: be at SHonline dot DE Assigned:
Status: Closed Package: Feature/Change Request
PHP Version: 3.0.5 OS: any
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.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: be at SHonline dot DE
New email:
PHP Version: OS:

 

 [1998-10-06 06:57 UTC] be at SHonline dot DE
it would be nice if the function (which array_wallk operates on) got
a second parameter passed: a string value which represents the
current key.

Now i could write

function output($val_ref, $key_name) {
  print("Element '$key_name' contains the value '$val_ref'\n");
}
array_walk(array(1,2,3,4), "output");

Thank You

Boris

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2001-02-10 12:32 UTC] jimw@php.net
this was done in 4.0.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu May 02 16:01:29 2024 UTC