2 ms·
> If you really do need the first element, you can use array_first That probably needs an array_second too, doesn't it? Maybe array_second_from_last as well?
by egeozcan 5mo ago
> If you really do need the first element, you can use array_first
That probably needs an array_second too, doesn't it? Maybe array_second_from_last as well?
- larsnystrom 5mo agoJust use array_values() and suddenly you can use int indicies again.
- pavel_lishin 5mo agoThat's foolish. It would clearly be named `second_array_element`.