PHP loop that stops at every iteration -


we have game writing in php , need loop through each player , allow them make move. problem having php loop through for , while loop upon page load , not let each player turn.

actually right in infinite loop since never evaluates true because doesn't let them make turn. should stop , let each player movehere(). activeplayer enables game board each player , once movehere executes properly, set $turnover true. however, loop never pauses , infinitely loops.

see code snippet:

for ($i=1; $i<=$charactercount; $i++) {     activateplayer($i);      while (!$turnover){         movehere();     } } 

"pausing" php makes no sense. php server-side, cannot interact php page @ middle of execution client (the browser).

you should consider reading documentation javascript , ajax (and client/server communication).


Comments

Popular posts from this blog

apache - Remove .php and add trailing slash in url using htaccess not loading css -

javascript - jQuery show full size image on click -