Showing posts with label program in php. Show all posts
Showing posts with label program in php. Show all posts

Wednesday, May 29, 2024

PHP Program to print Alphabet Pattern J

 PHP Program to print Alphabet Pattern  J

PHP Program to print Alphabet Pattern  J


Example  :-

<?php
echo "<pre>";
for($row=0;$row<11;$row++){
    for($col=0;$col<=11;$col++)
    {
        if($col ==-1 OR (($row==10 )AND $col>0
        AND $col<15)OR($col==11 )
        OR($col==$row-14  ))
        {
            echo"J"; //only change the echo
            //value "*" than display tha * structure.  
        }
        else {
            echo "&nbsp;";
        }
        }
        echo "<br>";
    }
    echo "</pre>";
?>
PHP Program to print Alphabet Pattern  J

Output :-



Related Post