Y
Y
yischyk2019-08-05 00:20:33
In contact with
yischyk, 2019-08-05 00:20:33

Get post_id vk api?

{
     "response": {
     "post_id": 158
      }
}

post_id get

Answer the question

In order to leave comments, you need to log in

1 answer(s)
E
entermix, 2019-08-05
@yischyk

Use the json_decode function:

$json = '{
     "response": {
     "post_id": 158
      }
}';

$arr = json_decode($json, true);

$post_id = $arr['response']['post_id']; // 158

https://www.php.net/manual/en/function.json-decode.php

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question