for loop in php
/*
For loop in php
*/
<?php
for ($i = 0; $i < 10; $i++) {
echo $i."<br>";
}
?>
for loop in php
/*
For loop in php
*/
<?php
for ($i = 0; $i < 10; $i++) {
echo $i."<br>";
}
?>
how create loop php
for (initialization; condition; increment){
code to be executed;
}
//Example
<?php
$a = 0;
$b = 0;
for( $i = 0; $i<5; $i++ )
{
$a += 10;
$b += 5;
}
echo ("At the end of the loop a = $a and b = $b" );
?>
//.......................................//
do {
code to be executed;
}
while (condition);
//Example
<?php
$i = 0;
$num = 0;
do {
$i++;
}
while( $i < 10 );
echo ("Loop stopped at i = $i" );
?>
Copyright © 2021 Codeinu
Forgot your account's password or having trouble logging into your Account? Don't worry, we'll help you to get back your account. Enter your email address and we'll send you a recovery link to reset your password. If you are experiencing problems resetting your password contact us