Created
February 11, 2012 18:04
-
-
Save mediaupstream/1803346 to your computer and use it in GitHub Desktop.
php console.log to the JS console. very awkward :)
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 consoleLog ( $d ){ | |
| if(is_array($d)) $d = json_encode($d); | |
| echo "<script> console.log('". $d . "'); </script>"; | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment