The for statement is a maintstream loop controlling statement across most of programming languages. When number of repetition of loop is known, the for loop is the best candidate to be used. It is very similar to that in C or other languages such as JavaScript language.
Syntax for FOR statement
<?php
for (initial; count_check; increment)
{
// code goes here
}
?>
Example with a FOR statement
Comments
No comments have been made yet.
Please login to leave a comment. Login now