Y
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
pavel_lishin
18 days ago
That's foolish. It would clearly be named `second_array_element`.
link
larsnystrom
18 days ago
Just use array_values() and suddenly you can use int indicies again.
link