Answer the question
In order to leave comments, you need to log in
How to remove parent array keys?
There is a code:
$mas = array();
foreach ($selected as $select) {
$mas[] = [$select['category_id'] => ['Selected' => true]];
};
print_r($mas);
Array
(
[0] => Array
(
[1] => Array
(
[Selected] => 1
)
)
[1] => Array
(
[2] => Array
(
[Selected] => 1
)
)
)
[1] => Array
(
[Selected] => 1
)
[2] => Array
(
[Selected] => 1
)
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