public function make_columns($array = array(), $col_limit = 0)
{
if (!is_array($array) or count($array) === 0 or !is_int($col_limit)) {
return FALSE;
}
// Turn off the auto-heading feature since it's doubtful we
// will want headings from a one-dimensional array
$this->auto_heading = FALSE;
if ($col_limit === 0) {
return $array;
}
$new = array();
do {
$temp = array_splice($array, 0, $col_limit);
if (count($temp) < $col_limit) {
for ($i = count($temp); $i < $col_limit; $i++) {
$temp[] = ' ';
}
}
$new[] = $temp;
} while (count($array) > 0);
return $new;
}