Skip to content
Discussion options

You must be logged in to vote

Array indexes in php are zero-based, which means the first element has an index of 0.

So the expected output is

[0 => 1, 1 => 2]

which is equivalent to your output

[1, 2]

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by driesvints
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants
Converted from issue

This discussion was converted from issue #38254 on August 06, 2021 07:25.