Answer the question
In order to leave comments, you need to log in
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
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 questionAsk a Question
731 491 924 answers to any question