Skip to content
Advertisement

Tag: while-loop

How to out of while and for loop combined

I am trying to write a code that is capturing number 3. using while loop as the condition, so that the for statement will be the evaluation condition of $x, of the while loop statement, and by the same time, using if statement to evaluate the value of $x=3 and so it can echo ‘three..’; . please enlighten me. thank

PHP: Why does this return “undefined offset” every time?

So basically this is an algorithm I made for a battleships game. I’m having problems with the while loop, I want to have the code inside the do while loop keep repeating, if the generated values already exist in a multidimensional array, and it looks like it actually works, because it generates correct values, but I keep getting the error

How to get the value of while loop(PHP) using JavaScript?

I have this while loop in PHP In this loop, when we click on the “delete” link, the value of variable “$post_id” changes. I want to get the value of “$post_id” when it changes. I tried with this JS code But it only gives me the last value of “$post_id”. I want to get each value of “$post_id” when it

Advertisement