ad

Wednesday, May 29, 2024

PHP Program to print Alphabet Pattern M

PHP Program to print Alphabet Pattern M

PHP Program to print Alphabet Pattern  M

PHP Program to print Alphabet Pattern  M

Example  :-

<?php
echo "<pre>";
$j=22;
for ( $row =0; $row <=10; $row++){
    for($col=0;$col<=22; $col++){
        if($col==$j){
            echo "M";
            $j= $j-1;
            }
            if($col==0 OR $col==22 OR $row
==$col-1)
              {  echo"M";
            }
            else {
                echo "&nbsp;";
        }
    }
   
    echo"</br>";
}
echo "</pre>";
?>


PHP Program to print Alphabet Pattern  M

Output :-

PHP Program to print Alphabet Pattern  M


Related  Post :-

html pre tag

html block and inline element

php program to print heart star pattern

PHP Program to print Alphabet Pattern J

 PHP Program to print Alphabet Pattern  J

PHP Program to print Alphabet Pattern  J


Example  :-

<?php
echo "<pre>";
for($row=0;$row<11;$row++){
    for($col=0;$col<=11;$col++)
    {
        if($col ==-1 OR (($row==10 )AND $col>0
        AND $col<15)OR($col==11 )
        OR($col==$row-14  ))
        {
            echo"J"; //only change the echo
            //value "*" than display tha * structure.  
        }
        else {
            echo "&nbsp;";
        }
        }
        echo "<br>";
    }
    echo "</pre>";
?>
PHP Program to print Alphabet Pattern  J

Output :-



Related Post 

php program to print alphabet pattern I

html unordered list

PHP Program to print Alphabet Pattern L

 PHP Program to print Alphabet Pattern  L

PHP Program to print Alphabet Pattern  L


Example:-

<?php
echo "<pre>";
for($row=0;$row<11;$row++){
    for($col=0;$col<=11;$col++)
    {
        if($col ==0 OR (( $row==10)AND $col>0
        AND $col<15)OR($col==0 AND $row!=1 AND
$row<1)
        OR($col==$row-10 AND $row >15))
        {
            echo"L"; //or echo "*" inclue
value than
            //print to tha * value
            //  put the echo "L"  value
than print/display  to the
             //L value
        }
        else {
            echo "&nbsp;";
        }
        }
        echo "<br>";
    }
    echo "</pre>";
?>

PHP Program to print Alphabet Pattern  L

Output :-

PHP Program to print Alphabet Pattern  L




Related Post :-

php program palindrome number

php program to print triangle pattern

PHP Program to print Alphabet Pattern E

 PHP Program to print Alphabet Pattern  E

PHP Program to print Alphabet Pattern  E


Example :-

<?php
echo "<pre>";
for($row=0;$row<11;$row++){
    for($col=0;$col<=11;$col++)
    {
        if($col ==1 OR (($row==0 or $row==5
or $row==10)AND $col>1
        AND $col<15)OR($col==9 AND $row!=1 AND
$row<1)
        OR($col==$row-10 AND $row >15))
        {
            echo"E";
        }
        else {
            echo "&nbsp;";
        }
        }
        echo "<br>";v
    }
    echo "</pre>";
?>

PHP Program to print Alphabet Pattern  E

Output :-




Related Post ::-

 armstrong number program in php

php if statements

php operators

Tuesday, May 28, 2024

PHP Program to print Alphabet Pattern U

 PHP Program to print Alphabet Pattern UUU


PHP Program to print Alphabet Pattern U


Example ::-

<?php
echo "<pre>";
for($row=0;$row<11;$row++){
    for($col=0;$col<=11;$col++)
    {
        if ($col ==2 OR (($row==10)AND $col>1
         AND $col<9)OR ($col==9 AND  $row<10) )
       
        {
            echo"U";
        }
        else {
            echo "&nbsp;";
        }
        }
        echo "<br>";
    }
    echo "</pre>";
?>

PHP Program to print Alphabet Pattern U

Output::-


Related Post::-