for loop increment in php on button click -


I have a button when it is redirected to a function that initially has $ i = 0 < / Code> Then increased by 1, it has also been checked that if it is less than 10 then its code runs. But when I click on the button again, it should increase from 1 and now the value should be 2. This is my code.

  function testing () {$ i = 0; $ I ++; Click on the button ($ i & lt; = 10) {sample code}}  

button, this function is called. Try

below: -

  var i = 1; Function testing () {if (i & lt; = 10) {sample code} i ++; }  

Comments

Popular posts from this blog

Member with no value in F# -

java - Joda Time Interval Not returning what I expect -

c# - Showing a SelectedItem's Property -