Possible Duplicate:
how to put javascript variable in php echo
I have JavaScript to get time and the code is below.
<script type="text/javascript">
var d = new Date();
var H = d.getHours();
var m = d.getMinutes();
if(H>11)
{
var h = H-12;
var a = 'PM';
}
else
{
var h = H;
var a = 'AM';
}
</script>
Now, I want to print the variables in PHP that used in JavaScript like,
<?php echo $h.$m; ?>
Is it possible?
if yes then help me.