Can anyone tell me how to increment a php variable inside a javascript function.I have a javascript function which is called for every 3 seconds inside this function i need to increment the php variable.
<? php $k =0?>
function slide()
{
//increment $k
var j =<? php echo $k++; ?>//when I do this k is not incremented
}
Can anyone tell me where I went wrong?Is their any other alternative to do this?
Thanks,
Shruti