Voting

: eight plus zero?
(Example: nine)

The Note You're Voting On

marianbucur17 at yahoo dot com
9 years ago
If array_column is not available you can use the following function, which also has the $index_key parameter:

if (!function_exists('array_column')) {
function array_column($array, $column_key, $index_key = null)
{
return array_reduce($array, function ($result, $item) use ($column_key, $index_key)
{
if (null === $index_key) {
$result[] = $item[$column_key];
} else {
$result[$item[$index_key]] = $item[$column_key];
}

return $result;
}, []);
}
}

<< Back to user notes page

To Top