query("SELECT * FROM digged_posts WHERE post_id = '".$video_id."' ;")) { while ($row = $result->fetch_assoc()) { $data = $row; } $result->free(); } $mysqli->close(); if (empty($data['post_id'])) { EXIT; } $data_video = RETURN_DUPLICATES_FULL(array($data), array(array('format' => 'hls_url', 'type' => 'REDDIT', 'sort_by_quality' => 1), array('format' => 'videos', 'type' => 'GIF')), array('REDDIT', 'GIF'), 1, 100); //==========// $title = clean_title($data['title']); $title = html_entity_decode($title); //==========// $duplicates_videos = json_decode($data_video[0]['duplicates_videos'], TRUE); $duplicates_screenshots = json_decode($data_video[0]['duplicates_screenshots'], TRUE); for($d=0;$d $duplicates_videos[$d]['url'], 'type' => $type); } //=========// ?> <? echo $title; ?> loop >