Created
January 16, 2022 19:13
-
-
Save uglyeoin/a0f83d7b6c41462b330841314819cfce to your computer and use it in GitHub Desktop.
This file contains 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>"; | |
} | |
// Then you can use it like this: | |
debug_to_console("Test"); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment