Answer the question
In order to leave comments, you need to log in
What is the most elegant way to make an unnamed array named in php, while the element name must be taken from the element itself, which is an array?
I have an array like this:
Array(
[0] => Array([id] => 341894 [name] => Дата экскурсии [values] => Array([0] => 1447372800) )
[1] => Array([id] => 341942 [name] => TripBook [values] => Array([0] => Array([value] => 0)) )
[2] => Array([id] => 341944 [name] => SAdvice [values] => Array([0] => Array([value] => 0)) )
[3] => Array([id] => 562286 [name] => Название экскурсии [values] => Array([0] => Array([value] => Тест)) )
)
Array(
[id341894] => Array([id] => 341894 [name] => Дата экскурсии [values] => Array([0] => 1447372800) )
[id341942] => Array([id] => 341942 [name] => TripBook [values] => Array([0] => Array([value] => 0)) )
[id341944] => Array([id] => 341944 [name] => SAdvice [values] => Array([0] => Array([value] => 0)) )
[id562286] => Array([id] => 562286 [name] => Название экскурсии [values] => Array([0] => Array([value] => Тест)) )
)
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question