I believe you are asking about a while-do php.net/manual/en/control-structures.do.... As per the PHP Manual: $i = 0; do { echo $i; } while ($i > 0) Or: do { if ($i.
I believe you are asking about a while-do php.net/manual/en/control-structures.do.... As per the PHP Manual: $i = 0; do { echo $i; } while ($i > 0); Or: do { if ($i.
$n starts at 50 $n = 50; // so long as n is above or equal to twenty, subtract 10. While( $n >= 20 ) $n -= 10; // at this point, n will *always* be less than 20, so we'll out put it. // print is one way to output n.
Print $n.
I think I get what your saying. You want to deduct 10 from the value of $n until you get below 20? Try: $n = 50; while($n >= 20){ $n = $n - 10; } echo $n; If $n is less than 20, it will never go into the loop and it will be left alone.
IF $n is greater than 20, it will start deducting 10 and will not preform the echo until $n is less than 20 If you pass in 18, you will echo 18. If you pass in 50, you will echo 10 (because 20 is still >= 10 so it will deduct once more) If you pass in 48, you will echo 18.
Thanks a lot I did learn a lot I will bookmark this site very helpfull – naZgul Jul 10 at 6:36.
I come across to a part where I need to set a particular condition and then output will only display if condition will be meet. Is this possible? Still trying to learn.
I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.