D
D
Dr Zhmurge2019-10-20 16:42:05
PHP
Dr Zhmurge, 2019-10-20 16:42:05

How to access data via php from json array?

Through CURL request I receive data in the form of JSON. The response looks like:

{
    "result": {
        "HEADER": [
            "15.10.2019 <br /> <b>вторник</b>",
            "ОФ-К-1",
            "ОФ-К-2"
        ],
        "ROWS": {
            "10": {
                "1/2": [
                    "<td>10:00 - 10:30</td>",
                    "<td class=\"\" data-date=\"15.10.2019\" data-cabinet=\"1\" data-hour=\"10\" data-minute=\"1/2\">100 руб.<p>Отмена за: 01 ч.</p></td>",
                    "<td class=\"\" data-date=\"15.10.2019\" data-cabinet=\"2\" data-hour=\"10\" data-minute=\"1/2\">100 руб.<p>Отмена за: 01 ч.</p></td>"
                ],
                "2/2": [
                    "<td>10:30 - 11:00</td>",
                    "<td class=\"\" data-date=\"15.10.2019\" data-cabinet=\"1\" data-hour=\"10\" data-minute=\"2/2\">100 руб.<p>Отмена за: 01 ч.</p></td>",
                    "<td class=\"\" data-date=\"15.10.2019\" data-cabinet=\"2\" data-hour=\"10\" data-minute=\"2/2\">100 руб.<p>Отмена за: 01 ч.</p></td>"
                ]
            } и т.д.,

How can we now output the desired data through the loop?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
F
FanatPHP, 2019-10-20
@DrZhmurge

site:toster.ru php output json

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question