";
$result = mysqli_query($sc_local, $query);
while ($row = mysqli_fetch_assoc($result)) {
$this_title = $row['title'];
if ($this_title!=$last_title) {
$title = '
' . strtoupper($this_title) . '
';
$history = $history . $title . '';
}
$last_title = $this_title;
}
echo json_encode($category_name."^^RECENTLY PLAYED
HISTORY IS DELAYED BY ".$s_num." TITLES
".$history);