';
foreach ($json as $key => $val) {
echo '
';
echo '' . h($key) . ' | ';
echo '';
if (is_scalar($val) || $val === null) {
if (is_bool($val)) {
$val = $val ? 'true' : 'false';
} elseif ($val === null) {
$val = 'null';
} elseif (!is_numeric($val)) {
$val = '"' . h(addcslashes($val, "\r\n\"")) . '"';
}
echo '' . $val . ' ';
} else {
$this->_buildTable($val);
}
echo ' | ';
echo '
';
}
echo '';
}
function editInput($table, $field, $attrs, $value) {
$json = $this->_testJson($value);
if ($json !== $value) {
$this->_buildTable($json);
}
}
}