2013-01-01, 02:55 AM
I'm trying to work on my own mod and I'm having a lot of trouble debugging my stuff.
I'd want to print out an array to the screen:
But it doesn't work. The page renders but between TEST and ENDTEST there is nothing there, not even in the webpage source. How can I print my arrays to the webpage?
I'd want to print out an array to the screen:
<?php
define("IN_MYBB", 1);
define('THIS_SCRIPT', 'barn.php');
$templatelist = "index";
require_once "./global.php";
add_breadcrumb("mybreadcrumb");
$testarray = array(
1 => "a",
"1" => "b",
1.5 => "c",
true => "d",
);
$barn = "<head>
<title>xyz test</title>
{$headerinclude}
</head>
<body>
{$header}
TEST " . htmlentities (var_dump($testarray)) . " ENDTEST
{$footer}
</body>
</html>";
output_page($barn);
?>
But it doesn't work. The page renders but between TEST and ENDTEST there is nothing there, not even in the webpage source. How can I print my arrays to the webpage?