I am trying to pass a variable to a php, I have tried the code below, but it was not working. Note: that the code below is just an example of what I am working on. I just made it that simple.
<script>
var value = 0;
alert("<?php echo"+value +" ?>");
</script>