var my_var = "<?php echo $my_variable; ?>";
var my_var = <?php echo $my_variable; ?>;
But, you can use on php file, Not on js file.
- Laravel 5 - How to prevent browser back button after user logout?
- Laravel 5 - Create Dummy Data using tinker factory
- PHP - Bootstrap autocomplete tokenfield with Ajax Example
- How to install composer using command line in ubuntu ?
- How to add ckeditor with image upload in Laravel ?
- JQuery - Display loading image on ajax call example
- Bootstrap notification popup box example using bootstrap-growl JS plugin with demo
- How to revoke 'git add' before 'git commit' ?