Ad

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

No comments

Powered by Blogger.