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

Comments

Popular posts from this blog

What Is CSS Text Color in 2026

CSS Padding Property Explained

CSS Outline Color Property in 2026