wpquicktips.wordpress.com
Using PHP variables in JavaScript with wp_localize_script
There is many ways to pass dynamic variables to JavaScript. An easy way would be just to define the JavaScript variables in the echoing the PHP variables. This will of course work, but…