How to parse JSON array from VK API?

Good time of day. I would like to implement such a thing, which analyzes the last 10 messages and if the message is not checked - we read that it was sent and if the message, for example, found in the "Base", or at the moment the Array, we chose one of the actions that corresponds to this message.

Lower the difficulty, I need to get the array via CURL, the workpiece is impossible, I get a json object, and immediately his decoder.

$token = 'TOKEN';

 $url = "".$token."";

 $curl = curl_init($url);
 curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
 curl_setopt ($curl, THIS, 0);
 curl_setopt ($curl, CURLOPT_SSL_VERIFYHOST, 0);
 $page = curl_exec($curl);

 $exited = json_decode($page, true);

As a result, I get this business:

How can I get the parameters:
  1. The text of the message
  2. ID of the user who sent the message
  3. ID dialogue
  4. ID messages

Help, please. I just need to record the data in the variable and not more. Only learn PHP, but right now is hard.

P. S Without The File_Get_Contents
June 7th 19 at 14:49
3 answers
June 7th 19 at 14:51
Message text:
ID of the user who sent the message
ID messages

In General, read the documentation for the methods in the API of each are described in detail.

PS and Yes, if you so will to execute the output code, the help you will wait a very long time. I just know what are the variables and how they are invoked. In such a sheet code even will not understand

P. P. S and another thing I did not pay attention, but as indicated , use json_decode($page); , i.e. without true
by the way , Yes, thank you. Will clarify in the response. - Verona.Torp34 commented on June 7th 19 at 14:57
Thanks, that's exactly what I was looking for) - Everett12 commented on June 7th 19 at 15:00
He json_decode($page, true); - esmeralda_Nolan commented on June 7th 19 at 14:54
June 7th 19 at 14:53
Based on the screenshot, if there is var_dump, then, perhaps like this:
$items = $exited['response']['items'];
foreach ($items as $item) {
 echo 'message id:' . $item['id'] . '<br>' . PHP_EOL;
 echo 'message text:' . $item['body'] . '<br>' . PHP_EOL;
 echo 'user id:' . $item['user_id'] . '<br>' . PHP_EOL;
 // and so on

In General, read the documentation.
Well, what comes, there is usually and so everything is clear
Thank you, too, as an example. :) - esmeralda_Nolan commented on June 7th 19 at 14:56
June 7th 19 at 14:55
The insecurity in this thread is caused by You lack of experience with JSON, actually.
For better understanding I recommend to build some kind of array and to parse.
In the world of API, a standard distribution of data for which it is JSON, it is useful to be able to disassemble and reassemble it.
Your idea I quite liked it, probably will do so when I get home from work. Thank you! :) - esmeralda_Nolan commented on June 7th 19 at 14:58

Find more questions by tags PHPVKontakteJSON