Voting

: min(two, three)?
(Example: nine)

The Note You're Voting On

kevin dot sours at internetbrands dot com
2 days ago
I didn't see this explicitly mentioned in the documentation but if an array value is not an array (or an object with the correct functions for access) or the column_key doesn't exist then that value will simply not have a corresponding value in the output

so array_column([[4,5,6], [7,8,9], 10], 0) will return [4,7]. It also means that the suggestion of

array_combine(array_keys($array), array_column($array, 'column'));

to preserve keys isn't safe unless you verify that nothing will be excluded by the array_column call.

<< Back to user notes page

To Top