假设你有这个:
while ($record = mysql_fetch_assoc($dbquery)) {
$arr[] = $record['$columnvalue1'];
}
$arraycount = count($arr);
并且您想要数组中的多个列这是如何完成的?
while ($record = mysql_fetch_assoc($dbquery)) {
$arr[] = array($record['$columnvalue1'],$record['$columnvalue2']);
}
$arraycount = count($arr);
上述代码错误:
Warning: array_count_values(): Can only count STRING and INTEGER values!