T
T
tipidl2018-03-13 17:34:00
PHP
tipidl, 2018-03-13 17:34:00

How to make a counter on the elements of an array?

A counter that will loop from 0 to 2 in a loop over the elements of an array and call at each step of the loop over the elements of another array
. Assume arrays $arResult["ITEMS"] array element $array with the corresponding index.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
Shyngys Sailaubai, 2018-03-13
@tipidl

You can clarify your question.
At the moment comes to mind

foreach ($array1 as $key => $value) {
  print $array2[$key];
}

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question