Share this post:
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.
- Install Sublime Text 3 in Ubuntu 14.04 using Terminal
- Laravel 5 mailchimp api integration from scratch with example
- How to integrate stripe payment gateway in Laravel 5.4 Application ?
- Select only one checkbox at a time using Jquery
- Multi select autocomplete jquery example with code
- How to add prefix in each key of PHP Array?
- How to generate random unique string in Laravel 5?
- How to remove all whitespace from string in JQuery?