Hacker News new | ask | show | jobs
by egeozcan 19 days 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?

2 comments

That's foolish. It would clearly be named `second_array_element`.
Just use array_values() and suddenly you can use int indicies again.