ad

Sunday, June 2, 2024

php program to print Alphabet pattern Z

 

php program to print Alphabet pattern Z

php program to print Alphabet pattern Z

Example :-

<?php

for($row=0; $row<7; $row++)
{
       for ($column=0; $column<=7; $column++)
    {
        if((($row==0 or $row==6)and $column>=0
        and $column<=6) or $row+$column==6)
        echo "*";
    else
    echo "&nbsp; ";
    }
    echo "<br>";
}
?>

php program to print Alphabet pattern Z

Output :-

php program to print Alphabet pattern Z


Related Post :-

html element tag

html table border

css introduction

php program print diamond number pattern

 

php program print diamond number pattern

php program print diamond number pattern 

Example :-

<?php
echo "<pre>";
for($i=1;$i<8;$i++)
{
    for($j=$i; $j<8;$j++)
    echo "&nbsp;&nbsp;";
for($j=2*$i-1;$j>0;$j--)
echo("&nbsp;1");
echo"<br>";
}
$n =8;
for($i=8;$i>0;$i--){
    for($j=$n-$i;$j>0;$j--)
    echo "&nbsp;&nbsp;";
 for($j=2*$i-1;$j>0;$j--)
 echo ("&nbsp;1");
echo "<br>";

}
echo"</pre>";
?>

php program print diamond number pattern 

Output :-

php program print diamond number pattern
Related Post :-

how to set background image html table

what is the html frame tag

html tag

php program print square number pattern

 
php program print square number pattern

php program print square number pattern 

Example :-

<?php
echo "<pre>";
//define the number of rows
$rows =5;
//loop each row
for($i=1;$i<=$rows;$i++){
echo "&nbsp;&nbsp;";
//loop each colum
for($j=1; $j<=$rows;$j++)
{
    echo $j*$j." ";
}
echo "</br>";
}
echo "</pre>";
?>


php program print square number pattern 

Output :-

php program print square number pattern


Related Post :-

css border property

html datatime picker

html paragraph tag

Saturday, June 1, 2024

php program print inverted Pyramid star pattern in php


php program print inverted Pyramid star pattern in php

 php program print inverted Pyramid star pattern in php

Example :-

<?php
echo "<pre>";
$n =10;
for($a=10; $a>0;$a--)
{
  for($b=$n-$a; $b>0; $b--)
  echo "&nbsp;&nbsp;";
for($b=2*$a-1; $b>0; $b--)
echo "&nbsp;1";
//change only  echo ""; value
    //for example :- 1,d,4,h,9,...etc
echo"<br>";
}
echo"</pre>";
?>

 php program print inverted Pyramid star pattern in php

Output :-

php program print inverted Pyramid star pattern in php


Related Post :-

php program palindrome number

php for loop

css border property

php program to print number increasing reverse pyramid

 
php program to print number increasing reverse pyramid

Q. php program to print number increasing reverse pyramid

Example:-

<?php
for($i=0;$i<=5;$i++)
{
    for($j=5-$i;$j>=1; $j--)
    {
        echo $j;
    }
    echo "<br>";

}
?>
php program to print number increasing reverse pyramid

Output :-
php program to print number increasing reverse pyramid



Related Post ::-

php program to print heart star pattern

php program to print increasing triangle

php program to print alphabet pattern K