Categories
How to display the third element of an array?
we have an array
Array ( [0] => 1 [5] => 10 [1] => 110 [2] => 123 [3] => 234 [4] => 345 )
Answer the question
In order to leave comments, you need to log in
echo array_slice($array, 2, 1)[0]; // or echo array_values($array)[2];
$array[1]?
By key directly or through a loop with a counter.
Didn't find what you were looking for?
Ask a Question
731 491 924 answers to any question