i am just trying to jquery value in php variable : there is the button of modal containing post id:      
`<button onclick='getValue("<?=$id?>");' data-toggle="modal" name="submit" data-target="#squarespaceModal">Purchase  Now</button>`
And when i alert this id it comes properly but i need this id in php variable  

		          `function getValue(id){
					       alert(id);
                      // i am trying this but not done
                     // <?php $xyz =?> id ;

					}`

also i am trying using this `$.post` but in modal the data is not coming
like `$.post( "<?=$current_url;?>", function( id ) {
							 // $( "#div1" ).html( id );
							 //alert(id);
							});`
plz help how can i set jquery value in php variable most of the example i have seen opposite example like `var x =<?php echo $y;?>` but i need opposite  
