第一种:数组$allbrand = array();while ($testingrow = mysqli_fetch_array ($testingquery)) { $allbrand[] = $testingrow[2];}第二种:字符串$allbrand = '';while ($testingrow = mysqli_fetch_array ($testingquery)) { $allbrand .= $testingrow[2]."";}请采纳,谢谢