/** * Builds an array parameterTypeID=>Name * * @param string $query The SQL query to run * @param Database $DB Reference to the Database object * @param array $result A reference to an array in which to * @param array $preparray Values for the prepared statements * store the output. * * @return array An array of the query where the index of the * array is the ParameterTypeID and the value * is the row from the query supplied. */ function getColumns($query, &$DB, &$result, $preparray) { $TwoDArray = $DB->pselect($query, $preparray); foreach ($TwoDArray as $containers => $cells) { $values = array_values($cells); $result[$values[0]] = $values[1]; } return $result; }