I am new to web development and I am using symfony2 for this project I am working on.
Have a template file called view.html.php and Inside this I have a JavaScript portion, inside which I want to assign JavaScript variable to PHP variable..I tried to do the following way but it did not work. Could some one please help me out with this.
<script>
....
var temp=json;
//error below
<?php $jsonobj= = temp ?>
...
</script>