$c=0;
while ($c < $count_err)
{
$i=0;
while ( $i < $num_rows_date)
{
$sql_code = "select COUNT(DISTINCT CELL_SN)ETTL from CE_BTEST where DATE_FORMAT(ACT_DATE,'%Y-%m-%d %T') BETWEEN ('$row_date[$i] 22:00:00' -INTERVAL 1 DAY) and ('$row_date[$i] 22:00:00') and CELL_TYPE like '$CELL_TYPE' and CELL_DENSITY like '$CELL_DENSITY' and SYS_ID like '$SYS_ID' and ERR_CODE like '$ERR_CODE[$c]' ";
$result_code[$c][$i] = mysql_fetch_array(mysql_query($sql_code, $Conn));
$value_code[]=$result_code[$c][$i][ETTL];
$n="data$c";
$$n=array();
$$n=$value_code;
$i++;
}
$c++;
}