D
D
Dmitry2018-02-15 18:37:52
PHP
Dmitry, 2018-02-15 18:37:52

Array case change?

Hello!
There is a large multidimensional array, with names in upper case.
How can I change all data to lowercase?
Option array_map('strtolower', $array) - not suitable, because the array is large.

Answer the question

In order to leave comments, you need to log in

3 answer(s)
D
doublench21, 2018-02-15
@doublench21

array array_change_key_case ( array $array [, int $case = CASE_LOWER ] )

0
0xD34F, 2018-02-15
@0xD34F

array_walk_recursive($array, function(&$item) {
  $item = strtolower($item);
});

O
Optimus, 2018-02-15
Pyan @marrk2

There is no other way, only this function or cycle

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question