Professional Documents
Culture Documents
PHP PR-7
PHP PR-7
Practical :- 7
Aim :- Write a PHP Script to show different looping structure.
4341604 Web Development using PHP 226370316054
OUTPUT:
4341604 Web Development using PHP 226370316054
Practical :- 7
Aim :- Write a PHP Script to show different looping structure.
<?php
echo"Using For Loop : -<br>";
<?php
echo"Using While Loop : -<br>";
$i=0;
While ($i < 5)
{
echo "Number: " . $i . "<br>";
$i++;
}
?>
4341604 Web Development using PHP 226370316054
OUTPUT:
4341604 Web Development using PHP 226370316054
Practical :- 7
Aim :- Write a PHP Script to show different looping structure.
<?php
echo"Using Do...While Loop : -<br>";
$i=0;
do
{
echo "Number: " . $i . "<br>";
$i++;
}
While ($i < 5)
?>
<?php
$colors = array("red", "green", "blue", "yellow");