echo php variable to 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!');
?><script>
console.log(<?= json_encode($foo); ?>);
</script>
Also in PHP:
- create random password with refresh in php
- find array key value by check key
- Method Illuminate\Database\Eloquent\Collection
- check my composer version
- catch (exception $e) php
- array exists in php
- change the format of date c#
- List all folder in pHP
- composer laravel 6 install
- You are *required* to use the date.timezone setting or t
- create a new project larave
- create directory php
- console.log phph
- find index of occurrence php
- count of string in laravel
- console log php
- encode image to base64
- filter in route:list
- 500 error ajax laravel
- date his in php
- Illuminate\Contracts\Container\BindingResolutionException Target class [HomeController] does not exist.
- create project in laravel
- @foreach output reverse
- check id strlen more than 10 laravel