console.log en 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:
- aadd day in date php
- clear config cache laravel
- app service provider laravel 191
- change the format of date c#
- codeigniter sms send
- find a specific word in a string php
- create a new laravel 8 project
- check key exist array php
- check length of a string in php
- custom rule laravel validation
- > cross-env NODE_ENV=development node_modules/webpack/bin/webpack.js --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js
- empty table in laravel
- Armstrong number
- acf options page
- ddev laravel setup
- a script for an alert when mouse right click is done javascript
- br2nl
- Allowed memory size of 1610612736 bytes exhausted
- a.length en php
- date with time in php
- convert base64 to image php
- duplicate array values php
- all error in php
- composer install last laravel