C
C
Corsair_TM2019-07-20 11:02:16
PHP
Corsair_TM, 2019-07-20 11:02:16

How to convert a string written as a multidimensional array to a multidimensional array?

Good afternoon, please help me to convert a string to an array:


I get this string from the database and I need to convert it to a multidimensional array so that I can work with it further.
So that in the end I could sort through this array and get a table
<table>
    <thead>
        <tr>
            <td>text</td>
            <td>text</td>
            <td>text</td>
        </tr>
    </thead>
    <tbody>
        <tr>
            <td>text</td>
            <td>text</td>
            <td>text</td>
        </tr>
        .........
    </tbody>

Answer the question

In order to leave comments, you need to log in

1 answer(s)
E
Evgeny Samsonov, 2019-07-20
@Corsair_TM

This is JSON

$json = '';
$array = json_decode($json, true);

sandbox.onlinephpfunctions.com/code/7a6a65dbdbebf8...

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question