console() 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:
- check if page is front page in wordpress
- check multiple permission laravel spatie
- code cesar php
- dates and time php
- __PHP_Incomplete_Class
- day of week count in php
- Laravel Eloquent, group by month/year
- change php version ubuntu
- csv file import encoding error
- date("Y-m-d",
- find str in str php
- binary base64 decode php
- delay in php
- add redirect page php
- Allowed memory size of 134217728 bytes exhausted (tried to allocate 16384 bytes) in
- find data type in php
- file_get_contents(): SSL: The operation completed successfully but file_get_contents(http://www.b2bsoftwareking.com): failed to open stream: No connection could be made because the target machine actively refused it. in
- append new line php
- date("U")
- check if after specific position has string php
- Call to a member function diffForHumans() on null (View: C:\xampp\htdocs\basic\resources\views\dashboard.blade.php)
- Tto upper php
- create dir using php
- add hour minute in datetime in php