Slacker News Slacker News logo featuring a lazy sloth with a folded newspaper hat
  • top
  • new
  • show
  • ask
  • jobs
Library
← Back to context

Comment by egeozcan

13 hours 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

egeozcan

Reply

pavel_lishin  4 hours ago

That's foolish. It would clearly be named `second_array_element`.

larsnystrom  12 hours ago

Just use array_values() and suddenly you can use int indicies again.

Slacker News

Product

  • API Reference
  • Hacker News RSS
  • Source on GitHub

Community

  • Support Ukraine
  • Equal Justice Initiative
  • GiveWell Charities