#echo $v.PHP_EOL;
#bye($f); return true;
if ($f == 'json') { echo json_encode($v).PHP_EOL; }
+ #elseif ($f == 'csv' and is_array($v)) { echo join("\n",$v)."\n"; }
+ #elseif ($f == 'csv') { echo join("\t",nb::ar_map('json_encode($a)',$v))."\n"; }
+ #elseif ($f == 'csv') { echo json_encode($v).PHP_EOL; }
+ elseif ($f == 'csv') {
+ #if (is_object($row)) echo "$row\n";
+ #$isHash = array_values($v) !== $v;
+ foreach ($v as $row) {
+ if (is_scalar($row)) echo "$row\n";
+ else echo join("\t",array_values($row))."\n";
+ }
+ #echo json_encode($v).PHP_EOL;
+ }
elseif (preg_match('/yaml|yml/',$f)) { echo $this->yaml_encode($v); }
elseif (preg_match('/php|var_export/',$f)) { echo var_export($v,true); }
elseif (preg_match('/var_dump/',$f)) { echo var_dump($v,true); }
if ($action == 'tables') {
return $this->out($this->tables());
+ } elseif ($action == 'dbs') {
+ return $this->out($this->dbs);
+
} elseif ($action == 'html_menu') {
$this->print_header($this->p('format','html'));
echo $this->html_menu();