PHP Program to print Alphabet Pattern K

  PHP Program to print Alphabet Pattern K

PHP Program to print Alphabet Pattern K

 Q.  What is Alphabet Pattern?

     1]  Alphabet Patterns   is a series of letters arranged in a specific order or shape. 

     2] There are many type of paper patterns  (such as  triangles, squares , circles formed                             ,B,C,d   arranging letters..etc).

     3]   They can also be used creatively in typography.
   

PHP Program to print alphabet Pattern K

Program

<?php
echo "<pre>";
$j=7;
$i =0;
 for($row =0; $row<=10; $row++)
 {
    for($col=0;$col<=10;$col++)
    {
        if($col==1 or (($row == $col +3)
        AND $col !=0))
    {
        echo "k";
    }
    else if($row == $i AND $col == $j)
    {
        echo "k";
        $i = $i+1;
        $j = $j-1;
    }
    else{
        echo "&nbsp;";
    }
    }
    echo "<BR>";

    }
    echo "</pre>";
    ?>
Output


RELATED POSTS:-

html course

how to create feedback form

contack us page design template

Comments

Popular posts from this blog

What Is CSS Text Color in 2026

CSS Padding Property Explained

CSS Outline Color Property in 2026