$query = $mysqli->prepare($string);
$query->bind_param('ss', $select, $select);
$query->execute();
$result = $query->get_result();
$r = array();
while($row = $result->fetch_assoc()){
$r[]['type'] = 'album';
$r[] = $row;
}
while($row = $result->fetch_assoc()){
$row['type'] = 'album';
$r[] = $row;
}