N
N
Nikita2020-12-04 18:57:25
PHP
Nikita, 2020-12-04 18:57:25

QIWI API PHP | How can I display the data I need on the page?

Hello! Please tell me how can I get certain data from the array that I get using the API? For example, I was able to withdraw the balance of the wallet. But the history of transactions - no. using the "" tag, I display the array on the page. It contains keys. Each key is roughly speaking a new transaction. And the key is new every time. Like this: [1],[2],[3], etc.

I understand that each transaction needs to be displayed in a loop, but how? After all, I can’t write each array key by hand ...

It’s more clear on the screen).
5fca5c13dfab7009187623.png

Answer the question

In order to leave comments, you need to log in

1 answer(s)
N
nokimaro, 2020-12-04
@WoT_Seller

https://php.net/foreach
If $resultthis is yours arraythen output like this

foreach($result['data'] as $transaction)
{
   echo $transaction['txnId']; 
   echo $transaction['provider']['shortName'];
}

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question