increment php variable in javascript function -


Can someone tell me how to increase a php variable inside a javascript function? I have a javascript function which requires every 3 seconds to increase the PHP variable within this function.

  & lt;? Php $ k = 0? & Gt; Function slide () {// increment $ k var j = & lt;? Php echo $ k ++; <>   

Can someone tell me where was I wrong? Do they have any other option to do this?

Thanks,

Shruti

running on the PHP server Javascript is the client side.

Users never see PHP, so there is no increase.

You need to do this Javascript function (clock) that keeps track of your 3 seconds, and then your javascript var j each past duration (if I fix your questions Have been understood from).

Comments