Skip to content
Advertisement

Tag: loops

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 loop and tag to go to another page [closed]

Closed. This question needs debugging details. It is not currently accepting answers. Edit the question to include desired behavior, a specific problem or error, and the shortest code necessary to reproduce the problem. This will help others answer the question. Closed 6 months ago. Improve this question Hi I have searched a lot to find a solution but still have

PHP with Loop Calculation [closed]

Closed. This question needs debugging details. It is not currently accepting answers. Edit the question to include desired behavior, a specific problem or error, and the shortest code necessary to reproduce the problem. This will help others answer the question. Closed last year. Improve this question Can some help, don’t know how to solve this using loop in PHP I

PHP echo/print value on for every 4th loop (start of count is 0)

How do i echo a value for each certain loop (4th) if my starting count number is 0? For example, the count is 0,1,2,3,4,6,7,8,9,10,11,12,13 I need it to echo/print on the following numbers: 3,8,12,16 Here’s my loop codes: It kind of works but unfortunately, it starts printing the $VALUE on #0 So it prints on the following count/numbers: 0,4,8,12 Instead

Get the first element in a for loop with php [closed]

Closed. This question is not reproducible or was caused by typos. It is not currently accepting answers. This question was caused by a typo or a problem that can no longer be reproduced. While similar questions may be on-topic here, this one was resolved in a way less likely to help future readers. Closed last year. Improve this question How

Advertisement