var multiplier = <?php echo 6; ?>;
2. echo PHP variable to an html element as a data attribute
<div id="item" data-category="<?php echo 'testing'; ?>">
This is an item
//OR with jQuery
For a more in depth look with pros and cons, you can check out this great stackoverflow question and answer.