I need add some html content to my page. I can do it like this:
$("#followUser").html('<label id="followUser"><button class="btn btn-primary" id="followUserButton"><i class="fa fa-check"></i> Unfollow</button></label>');
But I need to change button text dynamically like
$("#followUser").html('<label id="followUser"><button class="btn btn-primary" id="followUserButton"><i class="fa fa-check"></i> <?=$lng['2buttonFollow'];?></button></label>');
Second one is my solution but it does not work. Any idea? How to add some php variable by jquery?
Edit after the problem solved: It's about echo part. When I try to use short way of echo it makes fail for javascript. Actually my solution was true, just changed to echo.