console rint in php method
<script>
console.log(<?= json_encode($foo); ?>);
</script><?php
function console_log($output, $with_script_tags = true) {
$js_code = 'console.log(' . json_encode($output, JSON_HEX_TAG) .
');';
if ($with_script_tags) {
$js_code = '<script>' . $js_code . '</script>';
}
echo $js_code;
}
Also in PHP:
- create file php
- $mpdf
- code to set error for du[licate entry in php
- check if string include char php
- SSL operation failed with code 1. OpenSSL Error messages: error:14077438:SSL routines:SSL23_GET_SERVER_HELLO:tlsv1 alert internal error
- fgets php
- displaying laravel error in below input field
- am pm php date
- cache and compile file clear laravel
- base64 image encode php
- convert any phone number in us number format php
- check if string contain word
- convert date object to string php
- explode a number php
- phpmake string all lowercase
- PHP Warning: PHP Startup: Unable to load dynamic library 'openssl' window
- STR_TO_Time('" . $purchaseDate . "', '%Y-%m-%d %H:%i:%s'), php
- Laravel 8 KET TO LONG ERROR
- phptry catch
- file upload in php through ajax
- delete duplicates php
- extend php maximum execution time
- check if array position exist php
- check if array key matches php