M
M
Maxim Timofeev2018-04-27 21:41:09
PHP
Maxim Timofeev, 2018-04-27 21:41:09

How to parse a string into an array?

there is a line some1[some2][some3]as a matter of fact it is name input. Available as a string. There is also some value.
It is necessary to parse and get an array

$ar = [
            'some1'=>[
                   'some2' => [
                            'some3' => 'некий value'

I can't figure out how to do it. Nesting is unknown.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
I
Immortal_pony, 2018-04-27
@webinar

parse_str

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question