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.
- Pixel tracking code php example
- PHP Image upload without refreshing page using jquery example
- How to redirect route with querystring in Laravel 5?
- How to insert multiple records in Laravel 5?
- Laravel 5.3 new feature and update - $loop variable
- How to uninstall cordova and ionic in ubuntu
- HTML/FORM not found in Laravel 5?
- PHP - jquery ajax crop image before upload using croppie plugin