September 2001
Intermediate to advanced
768 pages
32h 45m
English
bool array_walk(array array, string func, mixed userdata)
Applies a specified function to each element of an array, along with optional input.
Returns:
TRUE on success; NULL if given invalid arguments
Description:
Traverses the given array and passes each element into the given function in turn. The function given as func is called once for every element of array . The function named by func can accept up to three parameters for each element:
| param1 | Key of the current element |
| param2 | Value of the current element |
| param3 | Value of the userdata argument to array_walk(), if given |
If the function named by func accepts more than three parameters, it generates a warning, unless that warning is suppressed either by using the error_reporting() ...
Read now
Unlock full access