\n"; echo "
\n"; echo "
\n"; echo "".htmlentities($headerText, self::ENT_FLAGS)."\n"; echo "
\n"; echo "
\n"; echo "
\n"; foreach ($items as $item) { if (is_scalar($item)) { echo "

" . htmlentities(strval($item), self::ENT_FLAGS) . "

\n"; } elseif (is_array($item)) { if (count(array_keys($item)) === 2 && isset($item["___!type"]) && isset($item["___!content"])) { // special item switch ($item["___!type"]) { case "HTML": echo $item["___!content"]; break; default: echo "invalid"; break; } } elseif (array_is_list($item)) { echo "
    \n"; foreach ($item as $i) echo "
  • " . htmlentities($i, self::ENT_FLAGS) . "
  • \n"; echo "
\n"; } else { echo "\n"; foreach ($item as $k => $i) { echo "\n"; echo "\n"; echo ""; echo "\n"; } echo "
" . htmlentities($k, self::ENT_FLAGS) . ""; if (is_scalar($i)) { echo htmlentities($i, self::ENT_FLAGS); } else { echo gettype($i); } echo "
\n"; } } else { echo gettype($item); } } echo "
\n"; echo "
\n"; //echo "\n"; } public static function bold(string $contents): array { return self::html("

" . htmlentities($contents, self::ENT_FLAGS) . "

\n"); } public static function italic(string $contents): array { return self::html("

" . htmlentities($contents, self::ENT_FLAGS) . "

\n"); } public static function bold_italic(string $contents): array { return self::html("

" . htmlentities($contents, self::ENT_FLAGS) . "

\n"); } public static function html(string $contents): array { return [ "___!type" => "HTML", "___!content" => $contents, ]; } public static function info(string|array $contents): void { if (is_string($contents)) $contents = [$contents]; self::message($contents, "INFORMATION", "SKYBLUE", "BLACK"); } public static function error(string|array $contents): void { if (is_string($contents)) $contents = [$contents]; self::message($contents, "ERROR", "RED", "WHITE"); } }