PHP Program to print Alphabet Pattern G

  PHP Program to print Alphabet Pattern G

PHP Program to print Alphabet Pattern G

Example :-

<?php
echo "<pre>";
for($row=0;$row<11;$row++){
    for($col=0;$col<=11;$col++)
    {
        if (($col ==1 AND $row !=0 AND
$row!=10)OR (($row==0 or $row==10 )AND $col>1
         AND $col<9)OR ($row==5 AND $col>2
AND $col<10)Or($col==9 AND $row!=0 AND $row
!=2 AND $row!=3 AND $row !=4 AND $row !=10))
       
        {
            echo"G";
        }
        else {
            echo "&nbsp;";
        }
        }
        echo "<br>";
    }
    echo "</pre>";
?>

PHP Program to print Alphabet Pattern G

Output :-

PHP Program to print Alphabet Pattern G

Related  Post :-

php if else statements

php program to print alphabet pattern U

php program print square number pattern

javascript email validation

Comments

Popular posts from this blog

HTML Tag

HTML Input Type Submit Syntax and Example

CSS Text Color Explained with Syntax and HTML Examples