0)
{
$output .= ‘
‘;
while($row = mysqli_fetch_array($result))
{
$output .= ‘

‘;
}
$output .= ‘

ID User name First name Last name Member Since Membership level
‘.$row[“member_id”].’ ‘.$row[“user_name”].’ ‘.$row[“first_name”].’ ‘.$row[“last_name”].’ ‘.$row[“member_since”].’ ‘.$row[“membership_level”].’

‘;
header(‘Content-Type: application/xls’);
header(‘Content-Disposition: attachment; filename=download.xls’);
echo $output;
}
}
?>