I have this
$ids = array_map(array($this, 'myarraymap'), $data['student_teacher']);
function myarraymap($item) {
return $item['user_id'];
}
I will would like to put an other parameter to my function to get something like
function myarraymap($item,$item2) {
return $item['$item2'];
}
Can someone can help me ? I tried lots of things but nothing work
$item2to be? A constant value?array_mapis flawed. Could you provide a proper example?array_column(). 3v4l.org/ZQXPo See Is there a function to extract a 'column' from an array in PHP?