console/log 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!');
?><?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:
- count php string
- Stored Procedures in Laravel
- Call to undefined method Illuminate\Session\Store::set()
- Undefined variable: subcopy laravel mail
- contains php
- create seeder laravel
- cache DB table laravel
- catch erro message php
- Undefined offset: 0 at laravel\framework\src\Illuminate\Routing\Router.php
- count letters in string php
- enable error reporting in php
- This behaviour is (currently) not supported by Doctrine 2
- creating new laravel project
- explode in php
- add day to php date
- base64 to image
- Max character count for string in php
- array unique php index not getting organised
- exit and location page php
- Difference in days of two dates in php
- expire Cache Manually laravel
- Laravel 8 KET TO LONG ERROR
- calculate total time from start and end datetime in php
- add seeder laravel