php array map passing parameters

Solutions on MaxInterview for php array map passing parameters by the best coders in the world

showing results for - "php array map passing parameters"
Molly
13 Sep 2016
1function myarraymap($item,$item2) {
2    return $item[$item2];
3}
4
5$param = 'some_value';
6
7$ids = array_map(
8    function($item) use ($param) { return myarraymap($item, $param); },
9    $data['student_teacher']
10);
11
Elena
16 Aug 2016
1array_map with param and user function php