PHP Learning : Forloop - Publik Talk

An informative website for every one.

Post Top Ad

Post Top Ad

Wednesday, August 2, 2017

PHP Learning : Forloop

Description:

THe forloop is used when you known in advanced how many times script should run..
init:  mostly used to a counts (but can be any code to be excuted once at the begging of the loop..

Code:

<?php

for($i=1; $i<=5; $i++)
{
echo "The number is ".$i."<br />";
}
?>


Output:

forloop

No comments:

Post a Comment

Post Top Ad