If we have a variable in php which holds a value then we can assign easily this value to js variable but the vice versa is possible?
For Assign php variable to js variable we use
<?php $r = 1; ?>
<script>
var s = "<?php echo $r; ?>";
</script>
But for assign js variable to php variable its not works
<script>
var s = 1;
</script>
<?php $r = echo "<script> s </script>"; ?>'
Not working