PHP debug console print
// 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!');
?><script>
console.log(<?= json_encode($foo); ?>);
</script>
Also in PHP:
- array_key_exists contains string
- date function attributes in php
- Dynamic title on every page laravel blade
- clear cahce config laravel in cpanel
- db seed specific seeder
- Illuminate\Database\QueryException SQLSTATE[42000]: Syntax error or access violation: 1071 Specified key was too long; max key length is 767 bytes (SQL: alter table `users` add unique `users_email_unique`(`email`))
- b64decode php
- Admob server-side verification php
- corsair k70 rgb mk.2
- alias seeddb='php artisan db:seed'
- data type check in php
- date inphp
- add days in current date php
- check if character in string php
- determine length of stirng php
- create laravel project with version
- encontrar una palabra dentro de una cadena php
- Basic features of Exception Handling php
- How can I install php7.4 on Ubuntu 18.04?
- Y-m-d H:i:s O format
- display the date and time in php
- curl_init() in php
- e_all error php
- PHP Numbers