console.log php variable
// 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 = array(
null => 'a',
true => 'b',
false => 'c',
0 => 'd',
1 => 'e',
'' => 'f'
);
echo count($a), "\n";<script>
console.log(<?= json_encode($foo); ?>);
</script>
Also in PHP:
- Check if something in array php
- create directory ph
- Exception.php
- base_64 decode using php code
- STR_TO_Time('" . $purchaseDate . "', '%Y-%m-%d %H:%i:%s'), php
- date + 1 php
- [ERROR] InvalidArgumentException: Wrong file in C:\xampp\htdocs\magento2.4\lib\internal\Magento\Framework\Image\Adapter\Gd2.php:64 Stack trace
- Best IDE for php
- create a directory using php
- create a class in php
- create laravel initialize cache
- $date php
- cheak type in php
- String includes() php
- clear firebase cacheweb hosting
- Calculate the number of minus between two dates in php
- create random password with refresh in php
- composer remove phpmailer
- artisan db:seed all
- array key exists and is true
- cache eloquent laravel 8
- array in array php foreach
- change existing migration laravel
- check if a key exists in an array