I have some code like this
var minAmountPay = <?php echo $this->chat['Current']['admin'] >= 1 ? 1 : $this->minAmountPay; ?>;
var userId = <?php echo $this->currentUserId?>;
I use ZF and I have a lot of javascript code in my action files. I want to create js-files for each action and do minifications of this files. But I can't create js-file because I have assigning php variable to javascript variable.
Maybe I need to use some javascript framework for this purposes?