How to use for loop in php

We will show the simple example of for loop. For loop is based on 3 parameters .
First is to initialize the value or we can say starting point .
Second parameter is for condition.
Third is for incrementing the value of variable.
For loop is very easy but very logical in php it is needed every where but if you know its use then you can play with for loop.
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "">
<html xmlns="">
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>FOR LOOP Examples in PHP</title>
//Lets take one simple example of array to print values with the for loop
$array = array('A','B','C','D');

//It will show the total vales of array as 4
$counter = count($array);
//Now we will print the data with the for loop
//$p<$counter means it will work till the $p is less that $counter and $p will add 1 every time when the loop moves
//It will show that array whose index is 0 and its value is A
echo '<br>';

//Lets take one more example to print values from 1 to 100 by for loop

//This will print 1 to 100 with one line space
echo $m;
echo '<br>';