Answer the question
In order to leave comments, you need to log in
How to define an image?
Hello.
Here is a method in VK API - wall.get .
How in PHP to make it so that it is determined if the image is then , and if the audio is then
Push on the idea of \u200b\u200bimplementation. <img src=""/>
<audio src=""/>
Answer the question
In order to leave comments, you need to log in
In items->attachments is an array of objects. Each of the objects has a type field, which has a value, for example, audio or photo, depending on the type. This value uniquely determines the type and, accordingly, the required tag. No problems either.
parse the API response
if the photo array exists - display its contents in a loop, say with photo_75
if the audio array exists - display the contents of the url
or do you completely chew it?
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question