for debugging I reasons I use very often PHP function var_dump()
<pre>
<?php
var_dump($myVariablesArray);
?>
</pre>
but I need to output its contents (and something more I use for my debugging) into a new popup window.
There are several examples about opening a new JS window, but I cannot find anything helping me opening a new window and printing from PHP into it, all this automatically when the page I'm debugging is loaded.
Any hint?
you could
var_export()
instead maybe. And then append it to the beginning of a txt on the server. Then you can have a little script in the second window that refreshes every 5 seconds, and shows that txt file. Much like a log.http://www.php.net/manual/en/function.var-export.php
pro: you can keep the txt between runs, and save the outputs.
con: the format is a bit different than
var_dump()