V
V
Vasya2019-03-26 15:22:54
PHP
Vasya, 2019-03-26 15:22:54

How to get js data from vk?

How to get js data in php vk api if it is 2 or even 4 times placed in an array!

Answer the question

In order to leave comments, you need to log in

1 answer(s)
T
Talyan, 2019-03-26
@fed7918

Fedor ,

<?php
$a='{
"response":
  {"items":[
  {"type":	"photo",
  "source_id":111342022,
  "date":1553194313,
  "photos":
    {
    "count":10,
    "items":[{
    "id":456247001,
    "album_id":257940624,
    "owner_id":111342022,
    "sizes":1}]
    }
    }]
    }
    }
';

$b=JSON_decode($a);

print "<pre>";
var_dump($b->response->items[0]->source_id);

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question