连mysql中文乱码解决:
$db->set_charset("utf8");
mysqli若直接写成
$total = mysqli_fetch_array($result)[0];
则会出错,可以改成
$arr = mysqli_fetch_array($result);
$total = $arr[0];
$db->set_charset("utf8");
mysqli若直接写成
$total = mysqli_fetch_array($result)[0];
则会出错,可以改成
$arr = mysqli_fetch_array($result);
$total = $arr[0];