Possible Duplicate:
How to pass JavaScript variables to PHP?
How to assign on this php variable assign javasript value
<script type="text/javascript">
var var_example = "2222";
</script>
<?php
echo $var_example_php = ?
/// How to assign on this php variable asign javasript value
?>
You simply cannot do that, you need to understand the difference between client/server side programming, you cannot assign Javascript value to PHP variable, yea but you can assign PHP value to your javascript