Tuesday, May 28, 2024

PHP Program to print Alphabet Pattern H

 PHP Program to print Alphabet Pattern H

PHP Program to print Alphabet Pattern H


Example :-

<?php
echo "<pre>";
for($row=0;$row<11;$row++){
    for($col=0;$col<=11;$col++)
    {
        if($col ==1 OR (($row==5 )AND $col>1
        AND $col<15)OR($col==11 AND $row!=5
AND $row<14)
        OR($col==$row-14 AND $row >8))
        {
            echo"H"; //only change the echo
            //value "*" than display tha *
structure.  
        }
        else {
            echo "&nbsp;";
        }
        }
        echo "<br>";
    }
    echo "</pre>";
?>

 PHP Program to print Alphabet Pattern H

Output :-


Related Post :-

php program to print alphabet pattern F

No comments:

Post a Comment