Created
April 12, 2020 04:32
-
-
Save victorwyee/396d02ad1a22aee94f170b2b325097a4 to your computer and use it in GitHub Desktop.
PHP print 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 print_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