сделал так
echo preg_replace("~\\\\\"~", "\"", $echo) ;for ($page = 1; $page < $repeat; $page++){
$timeline = file_get_contents('http://coub.com/api/v2/timeline/channel/'.$channel.'?page='.$page.'&per_page='.$per_page.'?order_by='.$order_by) ;
$regexp = '/"Coub::Simple","permalink":"(.+?)","title":"(.+?)","visibility_type":.+?"image_versions":\{"template":"(.+?)[%].+?version\}(.+?)"/';
preg_match_all($regexp, $timeline, $matches);
foreach ($matches[0] as $value) {
$span = '$2'; // "\"Вот она плять ,где заковыка ,при парсинге из json ☹..\"" ; //
$replacement = "<div class='coub' onmouseover='showName(this);'><a href='//coub.com/view/\\${1}1' onclick='return frame(this);'><img src='\$3small\$4'>\$2</a><span>$span</span></div>";
$echo = preg_replace($regexp, $replacement, $value) ;
echo preg_replace("~\\\\\"~", "\"", $echo) ;
}
}