Created
September 8, 2022 07:27
-
-
Save mebaysan/52d067d8e56308f260c9d9c20cb31a31 to your computer and use it in GitHub Desktop.
PHP debug to console...
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function debug_to_console($data) { | |
$output = $data; | |
if (is_array($output)) | |
$output = implode(',', $output); | |
echo "<script>console.log('Debug Objects: " . $output . "' );</script>"; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment