D
D
Demixovsky2015-08-06 01:52:38
API
Demixovsky, 2015-08-06 01:52:38

How to convert a string into a link in the VK API?

Through the API, the wall.get method extracts JSON, which is then converted into a regular PHP array.
The echo $wall[$i]->text;text of the post received via the API is displayed.
The text may contain the following: [id*******|user_name, or how it is written in the post]
Question: how can I convert the above text so that when parsed on the site, the above text is also transformed into a link with a signature?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
N
Nikita Kamenev, 2015-08-06
@NickStone

After receiving information through the API, use a regular expression to extract such text and convert it into links

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question