call php script output browser console
// 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!');
?>//display message in console
<?php
function console_log($msg) {
echo '<script>' .
'console.log("'.$msg .' ")</script>';
}
console_log("Hi there!");
?>
Also in PHP:
- check if a key exists in array php
- current date y-m-d php
- db::statement in laravel
- COMPOSER_MEMORY_LIMIT=-1 Allowed memory size of 1610612736 bytes exhausted
- How to check beautify json result using php
- Message: file_get_contents(): SSL operation failed with code 1. OpenSSL Error messages: error:1416F086:SSL routines:tls_process_server_certificate:certificate verify failed
- check if something is on a string php
- failed to open stream: no such file or directory php
- advance custon feilds
- catch an exception within a catch block php
- execcommand insert video
- exceptions (throwing | catching) in php
- Allowed memory size of 1610612736 bytes exhausted (tried to allocate 4096 bytes) in phar
- check string is present in php
- error reporting in php means
- cache:clear artisan laravel
- check if part of the srint is in other string php
- cache DB table laravel
- blade get string characters count
- Allowed memory size of 134217728 bytes exhausted (tried to allocate 157 bytes) in C:\wamp64\scripts\refresh.php on line 2263
- acf group
- convert timestamp to date php
- $time = date('r') php
- find substring in string php