Answer the question
In order to leave comments, you need to log in
How to make a link?
<div id="div-name"></div> <!-- выведет ДДТ - Последняя осень -->
<?php
$s = file_get_contents("http://данные с сервера получаем по этому url");
?>
<script>
var myDiv= document.getElementById("div-name"),
json = '<?php echo $s;?>',
data = JSON.parse( json );
myDiv.innerHTML = data.icestats.source.title;
</script>
https://vk.com/search?c%5Bq%5D=Мумий%20Троль%20-%20дельфины&c%5Bsection%5D=auto
<a href="https://vk.com/search?c%5Bq%5D=<div
id="div-name"></div>&c%5Bsection%5D=au
to"><div id="div-name"></div></a>
Answer the question
In order to leave comments, you need to log in
You have some strange approach. In a PHP variable you have JSON and it can be parsed by PHP itself and inserted immediately without javaScript. You will avoid the need for JS and any JSON escaping. Do everything in PHP, then creating a link will be much easier.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question