I
I
Ilya Parshakov2018-05-12 12:09:15
PHP
Ilya Parshakov, 2018-05-12 12:09:15

How to pull out the necessary data from a line and to push in an array?

Hello.
There is a line, like: qwerty[0]['bit']
How to pull out 3 values ​​(qwerty, 0 and bit ) and put into an array, like:

$arr = [
    'q' => 'qwerty',
    'key' => 0,
    'name' => 'bit '
]

Thanks in advance for your attention and any help!

Answer the question

In order to leave comments, you need to log in

1 answer(s)
H
Hnkhame, 2018-05-12
@parschakov

Regular expression sandbox.onlinephpfunctions.com/code/d1bfcfae6cc25c...

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question