Friday, November 30, 2012

Learning PHP - While Loop & Post Increment

While Loop


Execute the statement repeatedly while the expression or condition is TRUE.

syntax:

while (expression)
statement


Post Increment

example: a++  ( Returns a, then increments a by one )


Sample Program:


Used HTML tag
to insert a single line break.

Every loop, the value of $a increments and printed on the next line.

Output:

Learning PHP - Else . . . Else If

Learning PHP - Assignment, Comparison and If


No comments:

Post a Comment

Popular Posts