NAME map_mapping - map a mapping through a function SYNOPSIS mapping map_mapping(mapping m, string fun, object ob, mixed extra); DESCRIPTION This function calls ob->fun once for each value in the mapping m and returns a mapping constructed with the same indices as m, but the values returned from m->fun. The optional extra argument is sent to the function as a second argument for each call if present. EXAMPLE The code: int foo(int x,int y) { return x*y; } map_mapping((["foo":1,"bar":5,"gazonk":6]),"foo",this_object(),2); Would result in: (["foo":2,"bar":10,"gazonk":12]) SEE ALSO map_array, filter_mapping
Help topics available:
You are guest number 117 since November 2019.
This file was last modified: June 2000.