J
J
just_clarity2020-04-18 23:55:42
PHP
just_clarity, 2020-04-18 23:55:42

How to get array name with foreach?

I sort through such array
5e9b691861715737829960.png

How to me at foreach to learn names of these sorted arrays? blink etc.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Alexander, 2020-04-18
@just_clarity

foreach ($data as $name => $values) {
   echo 'Название массива: ', $name, PHP_EOL;
}

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question