public function fetchArray($sql) { $arrayDispList = NULL; if (!is_object(ReportGenerator::$dbCon) && !ReportGenerator::$dbCon instanceof DMLFunctions) { ReportGenerator::$dbCon = new DMLFunctions(); } $message2 = ReportGenerator::$dbCon->executeQuery($sql); $i = 0; while ($line = mysql_fetch_array($message2, MYSQL_NUM)) { for ($c = 0; count($this->field) * 2 > $c; $c += 2) { $arrayDispList[$line[0]][$c / 2][$line[$c]] = $line[$c + 1]; } $i++; } return $arrayDispList; }