console log data 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!');
?>// A little correction / improvement to @Kaotik's answer:
<?php
function consoleLog($msg)
{
echo '<script type="text/javascript">console.log('
. str_replace('<', '\\x3C', json_encode($msg))
. ');</script>';
}
consoleLog('Hello, console!');
?>
Also in PHP:
- convert small to capital in php
- Allowed memory size of 536870912 bytes exhausted (tried to allocate 264245248 bytes) http://localhost:8000/createProduct
- console.;og for php
- Artisan::call('db:seed', array('--class' => 'YourSeeder Class'));
- array in array php foreach example
- display error reporting
- Created Migration: laravel
- check if a string is inside another php
- base64_decode php online
- dmY PHP
- date format change in laravel blade
- contains function in php
- app service provider laravel 191
- codeigniter db insert return id
- SQLSTATE[42000]: Syntax error or access violation: 1071 Specified key was too long; max key length is 767
- find length of string in php
- eloquent seeder
- file to binary php
- addslashes php
- > cross-env NODE_ENV=development node_modules/webpack/bin/webpack.js --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js
- Allowed memory size of 134217728 bytes exhausted (tried to allocate 157 bytes) in C:\wamp64\scripts\refresh.php on line 2263
- custom rule laravel validation
- check length of a string in php
- convert lower to upper case php