While Loop in PHP
by TechVidvan Team
Program 1
<html>
<head><title>PHP Loops</title>
<body>
<center>
<?php
// $i=1; // intilization
// $n=23;
// echo "Table of=".$n;
// while($i<=10) //condition
// {
// echo"<br> ".$i*$n;
// ++$i; // increment
// }
/*
1 4 9 16 25........n
limit =16
1 .... 10 and sum of n number
while(condition) if(condition)
{ {
//code //Code
}
}
do while
for
for each
intilization
condition
increment/decrement
*/
?>
</center>
</body>
</html>
Tags: loops in phpPHPphp loopphp practicalphp programphp while loopWhile loopwhile loop in php
TechVidvan Team
TechVidvan Team provides high-quality content & courses on AI, ML, Data Science, Data Engineering, Data Analytics, programming, Python, DSA, Android, Flutter, full stack web dev, MERN, and many latest technology.