yeah sure, just echo the javascript: <?php echo '<script>var myPhpVariable = "'. $my_var . '";</script>'; ?>
More Related Contents:
- How to prevent the “Confirm Form Resubmission” dialog?
- Submit a form using Shift + Enter [duplicate]
- How is this not passing PHP values to JS and vice-versa?
- How print in Jquery / Datatables [closed]
- Sending email with gmail smtp with codeigniter email library
- How to set proper codeigniter base url?
- Adding months to a Date in JavaScript [duplicate]
- Find total number of results in mySQL query with offset+limit
- Pass a JS variable to a PHP variable
- Populate another select dropdown from database based on dropdown selection
- Passing PHP variable into JavaScript [duplicate]
- CodeIgniter MSSQL connection
- Jquery – Uncaught TypeError: Cannot use ‘in’ operator to search for ‘324’ in
- codeigniter, result() vs. result_array()
- How can we open a link in private browsing mode
- How does similar_text work?
- Automatically detect user’s current local time with JavaScript or PHP
- Whats the easiest way to determine if a user is online? (PHP/MYSQL)
- Javascript function post and call php script
- Unserialize PHP Array in Javascript
- CodeIgniter – how to catch DB errors?
- onbeforeprint() and onafterprint() equivalent for non IE browsers
- Object of class stdClass could not be converted to string
- Converting Javascript Regex to PHP
- How to stop GD2 from washing away the colors upon resizing images?
- How to keep form values after post [duplicate]
- Detect Ajax calling URL
- passing php string with multiple lines to a javascript function/variable
- How to assign Php variable value to Javascript variable? [duplicate]
- How can I have CodeIgniter load specific pages using SSL?