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 " ";
}
}
echo"</br>";
}
echo "</pre>";
?>
Post a Comment