在以下代码中,如何将数组值分配给 php 变量。
while($objResult = mysql_fetch_array($objQuery))
{
$cutomername[] = $objResult["firstname"];
$mailid[] = $objResult["mailid"];
$address[] = $objResult["address"];
$phonenumber[] = $objResult["phonenumber"];
$items[] = $objResult["itemname"];
$quantity[] = $objResult["quantity"];
$total[] = $objResult["grandtotal"];
$name = $cutomername[];
$mail = $mailid[];
$addr = $address[];
$phnum = $phonenumber[];
$itm = $items[];
$qty = $quantity[];
$tot = $total[];
}