In snippets, we see often code like this:
<?php
// we set at the beginning:
global $modx;
// then we might declare a variable like this:
$verifyUrl = $modx->config['base_url'];
?>
As we have some trouble with base_url in this
Thread , it would be handy for debugging to print out the content of the $modx array, to see what variables are available.
I was believing I can do this with print_r($modx), but that throws an error.
Can someone provide a code snippet that can display the content of $modx? That would be very helpful for debugging snippets. Thanks!