如何将元素添加到下面的数组中?
/// 为子类别的母公司名称构建交叉引用数组///
$newArray = array();
$comp_names = "SELECT company_name, company_id FROM pe_company_access";
$name_results = mysql_query($comp_names, $dbcnx);
while ($row5 = mysql_fetch_assoc($name_results))
{
$newArray = array($row5["company_id"] => $row5["company_name"]);
}
print_r($newArray);
谢谢,乔治