I
I
igoodmood2015-11-25 14:38:28
Algorithms
igoodmood, 2015-11-25 14:38:28

How to slice elements of an array?

How to slice elements of an array? For example, there is an array that consists of 7 elements, after the performed operations, it is necessary to display the first 4 elements.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
S
Shahelm, 2015-11-30
@Shahelm

Isn't it: php.net/manual/en/function.array-slice.php ?

V
volersawns, 2016-04-03
@volersawns

for ($i = 0; $i < 4; $i++) echo $a[$i];

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question