Created
December 17, 2024 06:35
-
-
Save shohag-cse-knu/7063a88b36b615cd906613bef2b6c9b3 to your computer and use it in GitHub Desktop.
To show the variables in console log in php script
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
| <?php | |
| //Here data is your variable or object or array | |
| echo "<script type='text/javascript'>console.log(".json_encode($data).");</script>"; | |
| ?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment