can do console on php?
// Assuming you are wishing to log to the JS Console...
<?php
function consoleLog($msg) {
echo '<script type="text/javascript">' .
'console.log(' . $msg . ');</script>';
}
consoleLog('Hello, console!');
?>/*
console.log in php
*/
<?php
function consoleLog($message) {
echo '<script type="text/javascript">' .
'console.log(' . $message . ');</script>';
}
consoleLog('Hello, greppers!');
?><?php
function console_log($output, $with_script_tags = true) {
$js_code = 'console.log(' . json_encode($output, JSON_HEX_TAG) .
');';
if ($with_script_tags) {
$js_code = '<script>' . $js_code . '</script>';
}
echo $js_code;
}
Also in PHP:
- artisan create seeder
- Allowed memory size of 2147483648 bytes exhausted (tried to allocate 4096 bytes) in phar://C:/composer/composer.phar/src/Composer/DependencyResolver/RuleWatchGraph.php on line 52
- What is the format of date function in PHP *
- clear server cache laravel
- -5 php change timezone
- - convert a string of numbers to a sentence in php code
- array_push in php
- current uri php[
- check key in php array
- database seeding in laravel
- array has key pp
- check if string cotains php
- exception handeling in php
- consloe.log in php
- Call to a member function connection() on null
- download laravel project
- Create cap with php
- date format Ymd php
- add seconds to datetime carbon
- array_search in php
- execute query and use die in php
- Check password match laravel
- check if key exists in the array
- How to Get Radio Button Value in PHP Without Submit