console log a variable in 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!');
?><script>
console.log(<?= json_encode($foo); ?>);
</script>
Also in PHP:
- check if php array key exists
- convert object to array php
- date format r php
- determine the date format from a string php
- collection methods laravel
- error reporting ini set dusplay errors
- Variable 'sql_mode' can't be set to the value of 'REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE( @@sql_mode'</p><p>SELECT * FROM `users` WHERE `username` = 'yth19203' ORDER BY `id` DESC</p><p>Filename: models/Crud.php</p><p>Line Number: 92</p> </div>
- codeigniter return id of last added record
- define header in different file php
- array index exists php
- date time with am pm in php
- "codeigniter 4" cart
- Carbon\Traits\Units.php:69
- calculate string length php
- count column eloquent laravel
- development wordpress plugin
- capitalise in php
- create symfony project
- delete duplicate values from array php
- collapse and expand phpstorm
- detectar comienzo cadena php
- decode base64 in php
- array_reverse in php
- current uri php[