Monday, May 27, 2024

PHP Program to print Alphabet Pattern R

 

PHP Program to print Alphabet Pattern R 

PHP Program to print Alphabet Pattern R


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)
AND $col>1
        AND $col<9)OR($col==9 AND $row!=0 AND
$row<5)
        OR($col==$row-2 AND $row >4))
        {
            echo"*";
        }
        else {
            echo "&nbsp;";
        }
        }
        echo "<br>";
    }
    echo "</pre>";
?>
PHP Program to print Alphabet Pattern R

Output :-

PHP Program to print Alphabet Pattern R


Related  Post:-

No comments:

Post a Comment