Voting

: max(five, four)?
(Example: nine)

The Note You're Voting On

benjam
9 years ago
Note that this function will return the last entry when possible keys are duplicated.

<?php

$array
= array(
array(
'1-1',
'one',
'one',
),
array(
'1-2',
'two',
'one',
),
);

var_dump(array_column($array, $value = 0, $index = 1));
var_dump(array_column($array, $value = 0, $index = 2));

// returns:
/*

array (size=2)
'one' => string '1-1' (length=3)
'two' => string '1-2' (length=3)

array (size=1)
'one' => string '1-2' (length=3)

*/
?>

<< Back to user notes page

To Top