Course Assessment
...
Equivalence of Looping Structures
This lesson explains how we can covert a for loop into a while loop.
An example of for loop is given below:
for
<?php$i;for ($i = 0;$i < 10;$i++){ $i = $i * 2; echo "Value of i is: $i\n";}echo "Final value of i is: $i\n";?>